Fix NPE in EntityTargetEvent when calling resetTask() twice. Fixes #877.

In vanilla, EntityAIAttackCollide resetTask() can be called twice, however,
CB adds an event call in this code which makes it non-idempotent: entityTarget
is nulled, but then on the next call entityTarget is dereferenced. To fix the
NPE when mods call resetTask() twice, we add a null check.