Fix for activating a gate and the gate telling you it is locked (because NPCs are still alive!).

This clears the pocketactions, adds 2 clearpockets and then re-queues all the actions for the pocket. This should avoid any looting issues or anything else odd. If their are no actions for the pocket in the XML it adds the default actions of activate and/or done.

This commit also fixes some problems with the bastion module.