1.3.1 Hotfix for collisions and stencil buffer

This hot fix addresses an inversion in the collision detection code where the y component of the mask lookup was inverted.

Also if a stencil buffer is not requested in the graphics device setup then an invalid operation would occur upon the first draw. Now we check if the stencil buffer is requested and only clear it when it is available.