Compiler warning fixes in NPC, bugbait and beam_shared

From #71.

Compiler details and warnings are in the commit descriptions, though that's probably a little useless if you fix on your end and push out instead of merging.