Moved pixels invalidation to endShape

Moved to account for a possibility that user uses get(), set() or
loadPixels() inside of beginShape()/endShape() block.
Changed setgetPixels to arePixelsUpToDate

Changed the name to better reflect the purpose of the variable.