Core/Misc: Fix some static analysis issues

Fix some static analysis issues about uninitialized values in scripts.
Add spell id validation in Unit::SpellNonMeleeDamageLog() .