Made the semaphore "fair".

Semaphores were unfair in that a thread that just called
acquire may get a resource before a thread that was waiting.
In this implementation, a thread that is waiting will always
get a resource before a thread that just called acquire.

Required changes:
- Semaphores now store two integers instead of one.
- Semaphore can now contain "negative" resources.
Fixed: Resouces can be acquired without being available.

An example of the bug:

semaphore s(-1); // resource_pool = -1, released = 0

Thread 1: s.acquire(); // Waits
Thread 2: s.release(); // resource_pool = 0, released = 1
Thread 1: // s.acquire() returns. released = 0

In this case, the resource pool started off at -1, but acquire()
still returned after only one release().
Added unit test for sizeof(semaphore)