Publish/subscribe behavior

Combined common patterns in senders into a behavior, and made it easier to add new ones.
Cleaner startup and shutdown,
removed unused files
Expanded tests for pubsub, but it's still pretty minimal.