Core/SmartScripts: speedup loading/validating sai scripts from db

Before:
>> Loaded 6953 SmartAI scripts in 3543 ms

After:
>> Loaded SmartAIMgr Helpers in 4 ms
>> Loaded 6953 SmartAI scripts in 95 ms
Merge branch 'master' of https://github.com/TrinityCore/TrinityCore
DB/Waypoints: Some Outlands waypoints. Mostly Blade's Edge.
DB/Misc: Some Combat AI, Remove spawns, and aura fixes.
DB/Misc: fixed comment in one SAI script.
Core: Fix warnings
Merge branch 'master' of https://github.com/TrinityCore/TrinityCore
DB/SAI: Fix one linking error and updated a few to use CMC "Combat Movement Control"
Core/Movement: Fixed possible invalid memory access
Fix typo
Merge pull request #11309 from Lartza/master

DB/SAI: Fix typo
Merge branch 'master' of https://github.com/TrinityCore/TrinityCore
Core/SmartAI: Fixed issue where ranged caster would switch to combat ready state between cast.
Core/AI: Some code cleanup
Core/SmartAI: Reset Actions will not be processed until creature reaches home.
Core/SmartAI: SMART_ACTION_UPDATE_TEMPLATE will no longer ignore the target type and force the source creature (creature only) to be updated; from now on it updates the given targets to the given entry (actionparam1)
Merge branch 'master' of https://github.com/TrinityCore/TrinityCore
DB/SAI: Fix an error in Bladespire Mystic SAI
Core/Movement: Fix invalid memory access

Fix the stack implementation used in MotionMaster and added few sanity checks to ensure no underflows will be made.

Valgrind log:
 Invalid read of size 8
  at : MotionMaster::top() const (MotionMaster.h:115)
  by : MotionMaster::pop() (MotionMaster.h:91)
  by : MotionMaster::~MotionMaster() (MotionMaster.cpp:74)
  by : Unit::~Unit() (Unit.cpp:296)
  by : Player::~Player() (Player.cpp:880)
  by : WorldSession::HandleCharCreateCallback(Trinity::AutoPtr<PreparedResultSet, ACE_Thread_Mutex>, CharacterCreateInfo*) (CharacterHandler.cpp:665)
  by : WorldSession::HandleCharCreateCallback(Trinity::AutoPtr<PreparedResultSet, ACE_Thread_Mutex>, CharacterCreateInfo*) (CharacterHandler.cpp:516)
Core/Player: Add another exception to questgiver spell casting.