Improve few sceKernel clock functions
Quick fix
Improve sceMpegAvcDecode/YCbCr
Use -O3 for Mac/iOS release builds.
Add a waittype registry to handle callbacks right.
Handle waits inside semaphore waits properly.
sceKernelWaitSemaCB() should run callbacks first.

Patapon 2 gets back to the menu with this.
Make mutexes handle callbacks better + before.

Mutex and semaphores (but NOT lwmutexes) call callbacks before attempting
the lock, but only if it would not generate errors.

Have not yet tested other wait types.
Fix waits within waits for lwmutexes.

Also, it turns out sceKernelLockMutexCB() doesn't call callbacks on lock.
These are actually okay, happen on the second cb.
More work on control
Merge pull request #1109 from unknownbrackets/clang-opt3

Use -O3 for Mac/iOS release builds
Merge pull request #1110 from unknownbrackets/callbacks

Improve callbacks with waits
Merge pull request #1103 from raven02/patch-5

Improve sceMpegAvcDecode/YCbCr
Show bg and icon on pause screen.
iOS: Oops, need -O2 on RelWithDebInfo for profiling.
iOS: Port Android control fix.
iOS: Fix input buttons sticking.
Merge pull request #1112 from unknownbrackets/ios-ctrl

iOS: Fix button sticking (from @rock88)
iOS: Don't lock input state for so long.