Upgrade mechanism tested and working

The perks upgrade mechanism is tested and works.

There are still two major issues left: the costs dictionary is not
loaded correctly from the settings file, and assigned kerbals can still
be trained while in flight.