Optimized GravitySystem.

Also added more detailed createPlanet-func to EntityFactory
and used it in Planets.