Rewrite buildings

Major rewrite of building code. This will render the buildings much lighter.

* Supersedes #565 
* Resolves #389
* Resolves #327
* Resolves #68
* Resolves #490
* Resolves #533
* Resolves #520
* Resolves #1061

See #565 for rationale.

Major thanks to @pnorman. Thanks to @mkoniecz for place of worship code.