Added a protocol method to allow overriding of isOutgoingMessage

I have a scenario where the default behavior for figuring out incoming and outgoing will not work so I added an optional delegate method that would let me override that value.

ps. I have never submitted a pull request before.