Break giant "if/else if" clause in mapgen in two, so MSVC compiles can work again.

MSVC can't handle as many "if/else if" clauses in a single scope as are now in mapgen.cpp. The compiler bails out. This hack breaks the clause in two so MSVC compiles work, until this file is refactored. Not re-indenting anything as that's likely to cause more headaches for everyone.

Includes some other miscellaneous fixes for things that broke VS compiles recently.