fail-once code for custom avatar loading

if custom avatar loading fails, don't try again for this session.
wrong placement of array object initialization
refactor kingdom generator

new namespace/library thingy created with kingdom generator
functions/definitions and display values, separated out from generator
code.
kingdom generator fixes

fixes innerHTML error,no longer uses onSubmit, code cleaned up more and
now 'looks' the same as Goko's deck builder.
Merge pull request #143 from serakfalcon/master

Custom avatar loading fail-once code & Kingdom Generator upgrades