Set depth and color mask before clearing.
Add a timeout event.wait_for() method.

Not exactly like std::condition_variable, but similar.
Merge pull request #49 from unknownbrackets/event-timeout

Add a timeout event.wait_for() method
Fix for FBO on iOS devices (from rock88).
Buildfix for Mac.
Arg, buildfix for Mac.