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 didn't want to use `IPC_EXCL`. If a semaphore isn't explicitly deleted with `destroy`, it would raise if the process is restarted, which seems wrong to me. That's why I used that special `0` value above. Though maybe I should pass a flag or something instead of using a magic value?