Blackberry: buildfix.
Give up on supporting multiple libpng. FindPNG doesn't report the specific include dir it uses and the library name doesn't always match. So use libpng17 on Linux/Blackberry too.
Fix a few warnings, mostly type comparisons.
Update disabled IsReallyAClear() code.

Not sure if there's still something wrong about depth.
Add basic decimation to the depal clut cache.
Disable vertex arrays not in use.
Disable vertex arrays before depal as well.
Enable the glClear() optimization.

It seems to help and so far have not noticed any problems.
Oops, remove an old wrong comment.