Galaxy class: Encapsulate galaxy-related stuff

Just decided to merge #2890, #2891, #2892 into this PR, so here is the merged text (the commits already appear here anyway):

1. Convert the ```Galaxy``` namespace to a class so we can properly encapsulate everything that reflects our generated galaxy (and thus changes when different galaxy generators are used). At that step only the sector density map is part of the class  (was already part of the ```Galaxy``` namespace)
2. FactionsDatabase
   - Untangles ```CustomSystems``` and ```Factions``` a bit. ```CustomSystems``` are now initialized first (delaying faction assignment) the factions are loaded (and the missing ones assigned to the ```CustomSystems```). That way, home sectors are always properly available when generating factions.
   - Puts all the static ```Faction``` stuff in their own ```FactionsDatabase``` class and puts the database object into the ```Galaxy```
3. Separates static ```CustomSystem``` stuff into ```CustomSystemsDatabase``` class and puts it into ```Galaxy```.
4. And the last part of the series, which move the ```Sector``` and ```StarSystem``` caches to ```Galaxy```.

~~I'm a bit unsure if we should merge the parts separately (as the PRs suggest) or just make a single merge of this last one (which contains all the other ones).~~