bump JuicyPixels to 3.1.3.1, fix Ptr.hs, speed improvement