Made a canEntityAttack helper function

This will check all conditions required to determine if an entity can
indeed attack, or not. Also with this mobs will no longer try to attack
when frozen.