Pull do_merchant into moveship.cc
Pull moveship_onplanet, terraform, plow, do_dome, do_quarry, do_berserker, do_recover and est_production in doplanet.cc as static utility functions
Pull do_repair, do_habitat, do_pod, infect_planet, do_meta_infect, do_canister, do_greenhouse, do_mirror, do_god, do_ap, crew_factor, ap_planet_factor, and do_oap into doship.cc as static functions
Pull APadd, goverend, fix_stability, make_discoveries, attack_planet, output_ground_attacks, and planet_points into doturncmd.cc and mark them as static.  Call handle_victory at the end of do_update.  I guess this game was so unstable that no one realized that it wasn't actually possible to win.
Introduce ptype_t for planet types.  Use it in the planet type definition.  Remove one default condition in a switch that is no longer needed.