fix autorelease pools not being set (
issue #209) and format code a little
use PtrInt to match lua's use of ptrdiff. Needs testing.
Fixed messages complaining about no autorelease pool being set up with objects leaking on the Mac. I simply initialized an autorelease pool in the couple of places that needed it.