First attempt at fixing #39

Refactors some PubSub API logic and makes `hive_pubsub:publish()` asynchronous.