Add VS2010, VS2012 support; unify tabs vs. spaces; build.bat
Fix up some formatting.