The toilets on passenger planes flush with an impressive amount of force - Is the negative pressure inside the tanks generated by a pump or are the tanks connected to the outside air pressure? Considering that the toilets should also work on the ground, I presume pumps are used - on the other hand, maybe the low pressure is stored inside the tanks from the last flight? Also, pumps would mean the toilets don't work when the aircraft is not powered up - is this true? Also, how was the engineering problem solved of keeping the pumps or the tubes connecting to the outside free from waste?
The pressure in flight is generated by using the vacuum outside. This dosen't work on the ground or at low altitude, so there's a pump as well to draw out the air to create an artificial vacuum.
Not sure about this one, but since the aircraft is seldom not powered when a person is onboard (maintenance can't do much without power either), I can't think of this being a significant problem. There might be a little bit of leftover pressure.
Airbus states that the vacuum pump is powered off the AC power bus, so it may be powered from the ground or the APU when the engines aren't on.
As is seen in the picture below, the tank is rinsed out through with the help of a second port on the access cover to clean it out. The rest of the system I believe is designed to last until the next maintenance, when (I think) it's connected up to a high pressure hose to thoroughly clean it out.
A320 Toliet System:
A320 System Details.
In this video is shown a test of the A380 system. At about the 0:48 mark the presenter remarks that
So, at least in the A380 case, yes the negative pressure is achieved via pumps.
As for your last question
If you look at the video, you see that the pipes are connected on the top of the tank and the gravity will keep the waste away from the pump (in the assumption that no acrobatic maneuver will be performed, usually valid, but not always)
There is a vacuum-pump that draws the air out of the waste tanks. The whole system is under low pressure.
Here is a video explaining how the A380 toilet system works.