Fixed a mistake in the recent pathfinder bug-fix.

The (supposed) fix for bug regarding groups moving on railroads had a
bug: the path cost was being calculated in the wrong direction.
Reversed the effect of bPrereqReligion for units and buildings.

Previously, if bPrereqReligion actually meant that a religion must _not_
be present in order to construct the building/unit. This is
counter-intuitive, and so I'd guess it was a mistake. bPrereqReligion
now means that a religion is required. (Thanks to sjodster for pointing
this out.)

Note: this change has no effect with the current xml, because
bPrereqReligion is zero for all units and buildings anyway.
KmodPathFinder::MinimumStepCost now has a minimum value of 1.

This change prevents certain crash bugs & pathfinding problems which
could have resulted if the game had units with zero base moves, or roads
with zero move cost.
Added some debug logging to CvGame::normalizeAddExtras

Features and bonuses added by this function will now be reported in the
bbai log file. (That file may not be ideal for this sort of information,
but it's convenient for me.)

I've also made some stylistic changes to the function.

BetterBTSAI.h now defines gMapLogLevel to control the new logging.
Fixed an int overflow problem in CvPlayerAI::AI_foundValue_bulk

For starting locations, the original BtS code included a large factor
for precision, which very frequently caused the int value to overflow -
meaning that starting locations were often evaluated incorrectly.

I've removed this factor, and added some additional checks at the end of
the function to (hopefully) detect similar problems in the future.
Made some style & efficiency changes to CvGame::assignStartingPlots

The functionality is essentially unchanged, but way random numbers are
used is slightly different.
Added some randomness to CvMapGenerator::addUniqueBonusType.

The choice of area is now slightly more random.

Also, the way areas are looped through has been rewritten to be more
efficient and easier (for me) to read.
Made changes & fixes to the evaluation of starting positions.

Fixed a couple of problems in the original BtS handling of starting
positions which prevented the foundValue function from correctly
identifying existing starting positions. (eg. getMinOriginalStartDist
did not ignore it's own plot; and isStartingPlot did not count
dynamically chosen starting plots.)

Added some factors to the starting position evaluation to adjust for the
number of resources in the area, and the number of players already
placed in the area. The goal is to encourage players to be placed on the
most bountiful areas, and to reduce the likelyhood of isolated starts.

Fixed a bug which caused starting resource to be valued more highly than
intended.

Made a couple of other tweaks the the starting position evaluation.

Deleted some whitespace.
Made some large style adjustments to CvCityAI::AI_buildingValue

I've moved / changed some of the conditions in and around the main value
loop so that the code is easier to read / understand / maintain.

Also, BUILDINGFOCUS_WORLDWONDER is now defined such that it implies
BUILDINGFOCUS_WONDEROK.

A lot of the original code (which was commented out) has been deleted,
and some whitespace has been tided up.

Overall, the functionality should be roughly the same.
Tightened the conditions on the AI's "opportunistic wonder" builds.

'opportunistic wonder build 1' now requires that the player either has a
spare settler or a second city, and that they are not at war.

'opportunistic wonder build 2' now requires that the wonder be at least
as valuable to the city as whatever building the city would have built
instead of the wonder, also, the maximum build time is decreased when at
war.

Significantly reduced the chance of 'opportunistic wonder build 3' when
using 'total war', and when losing a war.
Removed the "Traits" and "Hints" categories from the Sevopedia.

Those two categories were empty, because I'd removed their contents in
the past. (I removed the traits pages because the bulk of their content
consisted of poorly written strategy advice. I don't remember why I
removed the shortcuts page.)
Changed some conditions and evaluations for bChop in AI_updateBestBuild

The bChop conditions now include a new case which allows new cities with
low productivity to chop regardless of how big the civ is, and
regardless of finacial trouble. The minimum city production and size for
this condition depends on leader personality.

Production from chopping is now valued more highly in cities with low
productivity.
CvPlayerAI::AI_neededWorkers now gives extra workers for some leaders.

Leaders with positive 'growth' flavour will have some extra needed
workers when their civilization is still small.
Tightened the 'financial trouble' threshold in the early game.

Civs below the map size's cities target will now have a lower 'safe
percent'
Adjusted CvPlayerAI::AI_maxGoldTrade to better deal with high incomes.

AI_maxGoldTrade now has some dependance on the player's incoming and the
player's stockpiled gold, independant of how much gold the player has
traded in the past. This will fix the problem of very rich AI players
refusing to trade their gold when they have no other use for it.
Multi-completion of units will now be reflected by the city's order queue.

In CvCity::popOrder, if more than one unit is finished in a single turn
(due to production overflow), then the city will remove that same number
of queued units of the same type from the queue, regardless of the order
of the queue.

Also, tidied up some whitespace and comment.
Fixed another minor mistake in my recent pathfinding 'bugfix'.

The condition for bMaxMoves was wrong when re-evaluating non
uniform-cost paths.
Fixed a bug which broke CvCityAI::AI_chooseBuilding completely.

There was an order of precidence problem which was causing this function
to essentially choose the building for any non-zero odds.

This bug was introduced in 61167cfe7b75824003, when I tried to "Reduced
the effect of pre-existing progress in AI_chooseBuilding." That's a long
time ago for such a serious bug. I'm surprised I'm only noticing it
now...
Moved some of the AI_buildingValue veto conditions to fix a cache bug.

There are some conditions which cause AI_buildingValue to return zero.
However, in certain situations these conditions were being bypassed when
the building value cache was already set.

For example, if the city evaluated a non-wonder building and cached the
value, then later on tried to evaluate the building again with the
BUILDINGFOCUS_WORLDWONDER flag, the flag would be ignored because the
cached value would be used before the flag was checked.

This problem is now fixed. (But I'm also going to fix it in another way
in the next commit.)
Rearranged lots of code in CvCityAI::AI_bestBuildingThreshold.

Several large nested if blocks have been replaced with 'if -> continue'
style conditions at the start of the building loop.

The loop now skips non world-wonder buildings if the world-wonder flag
is set.

Reduced the added value from existing production.

Automated cities will no longer consider 'team wonders'; just as they
don't consider national wonders or world wonders.