issue #3401: add bit operation for lua physics test

Linux doesn't support lua bit library. So I add some bit operation functions for lua PhysicsTest