Core/NetworkIO: Handle exceptions thrown from socket constructor when retrieving remote address
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 remote-tracking branch 'upstream/master'
Core/Trade: Fixed putting soulbound items to "will not be traded" slot
Scripts/Commands: Fix static analysis issues
Core/WorldSession: Fix socket not being closed on clean logout

Close the WorldSession socket if Player didn't even login or logged out successfully and then closed the client.
Core/Server: Add missing overrides
Core/Server: Use nullptr instead of 0 where pointers are expected
Merge remote-tracking branch 'upstream/master'