Fixes for factions, leaders and genders in networked games.

There was some oversight when changes to factions, leaders and genders set
up were made and as a result, in some cases, things were seriously broken.
This is an attempt to fix existing major problems. Some minor problems still
need to be addressed.

Specifically, this commit should fix problems with showing different factions,
leaders and genders lists for non-host and host players for the same sides. And
it should also avoid a situation where non-host player sees a "Custom" faction
even if it should not appear.