Compiler warning fixes in NPC, bugbait and beam_shared

From #46.

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.