Add some unit tests for the Mac version.
Fix some data inconsistencies.
Bring recent data changes to Android.
Fix sorting of upgrades so that cost calculations are correct.