Threading part 2

This adds more advanced threading support - specifically better handling of events and mutexes. This enables mutexes/events to now actually block and a correct context switch to occur. Also adds some stubs for missing SVC functions (DuplicateHandle, SleepThread). Fixes some bugs with how we do context switching. Adds a hack to set the GSP event to always signal "ready for more data".
2 years from now, someone will look at this line trying to figure out the point of this. Do you think an incapability of running personal TODO lists justifies the increased WTF-factor of the code base?