Add a new `#once()` function which only gets called once

- Also added a `close` event to the server which is emitted
on close. This was needed for my `once` test.
Merge pull request #3 from domharrington/feature/once

Add a new `#once()` function which only gets called once