Added guards test plus old code

Firstly - I'm doing some exams right now, so commits numbers could be
very sparse for a while.

I finished the tests on guards (albeit not entirely comprehensive
by any means) and will continue to check exception handling. Everything
seems to be working so far!

I also pulled in some old code which was intended to implement
monitors using binary semaphores! I'm not 100% sure if it works,
but I wanted to check it. I'd quite like to implement monitors, semaphores
and cond vars in POSIX threads to prove the power of channels beyond doubt,
but I wasn't sure if monitors would be very simple (I haven't tried yet),
so I wanted to have this around.