Calculated needed behaviors first, and removed golems from the inactive pool if they have a needed behavior.

I was noticing some golems will keep doing non-needed even if they're
low on mana or clay. This fix will cause them to be completely removed
from golem behavior process if a needed behavior is detected.