Allow for subscribe callback to return any value

This commit changes the behaviour of the various subscribe flavors
such that the callback can break the loop by returning any non-null
value.

This would allow, for example, context to be retreived from the message
and then used in such a way to return it to the caller.