Fix a resource leak in nixprof.cpp.
Do index testing before actually accessing the array pointers with it in function tryfit() in newdc/rend/gles/gles.cpp.

Technically only the i<128 checks matter, but moved them all 'forward' in the if statements for consistency.