Minor refactoring to fix concurrency problems.

- Modifies HDF example to use server blocking
- Modifies file writing test to use server-blocking
- Adds more testing against semaphores
- Adds extension server argument
- Fixed timeout bug where the cleanup greenlet would release semaphores that
  didn't belong to it.