Remove "determine_npc_behavior", etc.

Removed "determine_npc_behavior", moving its code into "tick_handler",
and made memory-saving adjustments to "tick_handler" and "move_npc".