Giant Amount of Bug Fixes

Seriously, there are a lot of 'em. This code's still a bit unreadable
though, so I definitely have to clean up the preprocessor defines later.
Also, a few parameters have been tweaked, and a few new belief-syncing
factors have been implemented (eg. the AI will now desire Sacred Sites
twice as much if it has two faith-purchasable buildings).