Rewrite AI BaseBuilder and add tech levels to TD.

The main blocker for tech levels was that they exposed the extreme dumbness of our AI base building.

This rewrites that part of the AI to be more sensible (there are still a couple of hacks carried over, and this doesn't touch any of the non-building AI bogosity), and implements four tech levels for TD:

* Low (everything before comm. center).
* Medium (everything before advanced comm. / temple).
* No Powers (everything except airstrike, nuke, ion cannon).
* Unrestricted (everything).

Fixes the bulk of #5416.
Yes, sounds like a plan. I also appreciate the new `HACK` indicators here and elsewhere.