Fix deprecation warnings from ofImage.cpp

Also caches the pixel data pointer. (This doesn't usually matter since getPixels is inlined, but it may help speed up debug builds)