Core/Misc: Fix static analysis issues
Scripts/Misc: Fix static analysis issues

Replace CAST_AI() macro with ENSURE_AI() when dynamic_cast is not supposed to return NULL.
Core/Player: Fix an issue with Player::RemoveRewardedQuest not deleting the queststatus_rewarded form database

Needed for SPELL_EFFECT_CLEAR_QUEST
Merge pull request #12810 from Carbenium/questreward

Core/Player: Fix an issue with Player::RemoveRewardedQuest not deleting ...
Merge pull request #9 from TrinityCore/master

pull