Improve callbacks with waits

This only does semaphores, mutexes and lwmutexes so far.

They're still somewhat broken, this doesn't fix all the issues in #1082.  But, it does improve things, fix Patapon 2 back to how it was before again, and the games I tested were all fine still.

-[Unknown]