Add support for sticky intents.

Intents are delivered when receivers are registered.

Closes #1024.