Made the loadout sortable.

Warning: this code is probably ugly, and in an ideal world I'd have done
more of the work in the LoadoutSlot class instead of the Loadout class.