Improve accuracy of sceHeap functions

Mostly fixes error codes, implemented sceHeapIsAllocatedHeapMemory() since I saw it was being called:

http://report.ppsspp.org/logs/kind/395?status=any

And made some of the memory management numbers more accurate.  Haven't really created proper tests yet, but I did mostly test each of these changes.

@shenweip I don't have any games actually using these funcs, so please let me know if this causes any problems.  Hopefully it will help things.

-[Unknown]