Custom avatar loading fail-once code & Kingdom Generator upgrades

If the http request to dom.retrobox.eu fails (no custom avatar detected) then don't try to load a custom avatar again for that session. Could easily be adjusted to automatically retry every n times, but I'm not sure it matters.

Also included is the start of an overhaul of the kingdom generator (although the code is refactored it's mostly cosmetic changes)