fix some potential bugs & use performance hints (found by PVS)

git-svn-id: svn://svn.code.sf.net/p/vpinball/code/trunk@912 14438d79-0ffd-4333-8ae7-ea2bdd901387