pubsub: refactor (fixes #98).

Here's the PubSub API refactor! The readme updates + tests will be good places to see it in action. Let me know if you see anything you think can be improved!