Core/Creatures: Added check for creature_equip_template.id = 0. 0 is a special value telling core to unequip all items
Core/Misc: Fix some static analysis issues