Core/Misc: Implement CMSG_SET_TAXI_BENCHMARK_MODE to toggle PLAYER_FLAGS_TAXI_BENCHMARK based on arguments. To enable/disable this, call '/script SetTaxiBenchmarkMode(1)' (1 = on, 0 = off). Basically debugs the taxi flight and outputs min, max and avg FPS during flight. Automatically toggled off when flight ends.
[DB/Errors] Fix a few DB errors.
Scripts/Halls of Reflection: Fixed accessing uninitialized memory
[DB/Errors] Really fix a few more errors.
Tools: Fix compiler warnings
Scripts: Fix two issues found by Valgrind

==3400== Invalid write of size 8
==3400==    at 0x1241C32: instance_ahnkahet::GetInstanceScript(InstanceMap*) const (instance_ahnkahet.cpp:54)
...
==3400== Conditional jump or move depends on uninitialised value(s)
==3400==    at 0xB5DEAE: std::tr1::_Hashtable<unsigned long, std::pair<unsigned long const, Creature*>, std::allocator<std::pair<unsigned long const, Creature*> >, std::_Select1st<std::pair<unsigned long const, Creature*> >, std::equal_to<unsigned long>, std::tr1::hash<unsigned long>, std::tr1::__detail::_Mod_range_hashing, std::tr1::__detail::_Default_ranged_hash, std::tr1::__detail::_Prime_rehash_policy, false, false, true>::_M_find_node(std::tr1::__detail::_Hash_node<std::pair<unsigned long const, Creature*>, false>*, unsigned long const&, unsigned long) const (hashtable.h:830)
==3400==    by 0xBDA4CA: std::tr1::_Hashtable<unsigned long, std::pair<unsigned long const, Creature*>, std::allocator<std::pair<unsigned long const, Creature*> >, std::_Select1st<std::pair<unsigned long const, Creature*> >, std::equal_to<unsigned long>, std::tr1::hash<unsigned long>, std::tr1::__detail::_Mod_range_hashing, std::tr1::__detail::_Default_ranged_hash, std::tr1::__detail::_Prime_rehash_policy, false, false, true>::find(unsigned long const&) (hashtable.h:698)
==3400==    by 0xBDA5BF: HashMapHolder<Creature>::Find(unsigned long) (ObjectAccessor.h:67)
==3400==    by 0xCB5C03: Map::GetCreature(unsigned long) (ObjectAccessor.h:114)
==3400==    by 0xB6E6EF: Unit::GetCreature(WorldObject&, unsigned long) (Unit.cpp:13023)
==3400==    by 0x10F0790: boss_hydross_the_unstable::boss_hydross_the_unstableAI::Reset() (boss_hydross_the_unstable.cpp:164)
Merge pull request #10559 from Discover-/Taxi-Benchmarking

Core/Misc: Implement CMSG_SET_TAXI_BENCHMARK_MODE to toggle PLAYER_FLAGS...
Core/Settings: Fix a crash if worldserver.conf DataDir setting is empty
[DB/SAI] Sleeping Giants (11432 & 11433)
Core/Settings: Fix build in non cpp11 compilers

std::string back() was only introduced in C++11, a pity..
DB/Conditions: Awakening Rod
Fix uninitialized UpdateMask field

Initialized UpdateMask::_bits to NULL in all constructors.
UpdateMask(UpdateMask const& right) constructor sets the field count with SetCount() method before any field initialization. This means that SetCount() will call delete[] on the uninitialized _bits pointer field, leading to undefined behavior.
DB/SAI: The Last of Her Kind credit update

By @untaught, fixes #10254
Merge pull request #10617 from jackpoz/updatemask_fix

Fix uninitialized UpdateMask field
DB/SAI: Cannot Reproduce (13320,13355) & Retest Now (13321,13322,13356,13357)
Core&Tools: Fix multiple issues found by a static code coverage tool
DB/Creature: Fix startup errors
Core/Threading: Fix race condition in Thread

Increment the reference count of m_task in Thread::start() before spawning the actual Thread that will execute the task, otherwise the thread might finish, decRef the task and delete it.

Valgrind log of the issue:
 Invalid read of size 8
   at 0x1314CAD: ACE_Atomic_Op_GCC<long>::operator++() (Atomic_Op_GCC_T.inl:34)
   by 0x15933FB: ACE_Based::Runnable::incReference() (Threading.h:36)
   by 0x1592D2D: ACE_Based::Thread::start() (Threading.cpp:136)
   by 0x1592C37: ACE_Based::Thread::Thread(ACE_Based::Runnable*) (Threading.cpp:111)
   by 0xF6C463: Master::Run() (Master.cpp:195)
   by 0xF725D0: main (Main.cpp:142)
 Address 0x26137278 is 8 bytes inside a block of size 24 free'd
   at 0x4C2B59C: operator delete(void*) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
   by 0xF67FDB: RARunnable::~RARunnable() (RARunnable.cpp:55)
   by 0x1593441: ACE_Based::Runnable::decReference() (Threading.h:40)
   by 0x1592E92: ACE_Based::Thread::ThreadTask(void*) (Threading.cpp:186)
   by 0x515EA35: ACE_OS_Thread_Adapter::invoke() (in /usr/lib/libACE-6.0.3.so)
   by 0x5F19F8D: start_thread (pthread_create.c:311)
   by 0x6A46E1C: clone (clone.S:113)

Closes #10619
Core/Auth: Implement time-based token for user login as described in RFC 6238.

New column in account table is a base32 of token key bytes,
coincidentally it is the same format Google's Authenticator Android app uses.
If you want that to work, set system time on server correctly and use ntpd.

Closes #10527

Signed-off-by: Nay <dnpd.dd@gmail.com>
Core/Player: Fix uninitialized Player field.

m_MonthlyQuestChanged was initialized only when loading a Player from DB and left uninitialized when creating a new Player.

Valgrind log:
 Conditional jump or move depends on uninitialised value(s)
   at 0x1148E2A: Player::_SaveMonthlyQuestStatus(Trinity::AutoPtr<Transaction, ACE_Thread_Mutex>&) (Player.cpp:19694)
   by 0x1146510: Player::SaveToDB(bool) (Player.cpp:19191)
   by 0x14F5D5C: WorldSession::HandleCharCreateCallback(Trinity::AutoPtr<PreparedResultSet, ACE_Thread_Mutex>, CharacterCreateInfo*) (CharacterHandler.cpp:660)

Closes #10620

Signed-off-by: Nay <dnpd.dd@gmail.com>