Implement Semian API

@Sirupsen, @fw42

This implements the API we discussed the other day: https://gist.github.com/Sirupsen/2c3e0fd18b1ee95de877

The hardest part was writing the tests, but I think I've covered all the case we care about. The tests are the part I care most about with regards to reviewing - the implementation was pretty straightforward.

I plan on adding this to the documentation - if you pass `0`, `register` won't call `semctl` to configure the semaphore value. The intention here is so that other processes can call `register` with the same symbol and not have it reset the semaphore.