Fix police spawning (Closes #2983)

It used an older version of the new-equipment API, and leaked onto the
Lua stack like crazy!
This commit also introduces LUA_DEBUG_* guards.