Improve threadend waits, add callback handlers, some cleanup

This cleanup may actually improve performance, since in one profile I saw it spending a lot of time inclusive in __GeTriggerWait().  We barely even use `threadqueue` anymore now, mostly just the ready queues.

Anyway, it mostly cleans up thread end and removes some of the old wait handling code that's not used anymore with these changes.

Just msgpipes left now, nothing else uses CB waits.

-[Unknown]