Improve xmpp filter branch

Allow partial matches on branch name
Added so I could use the result in unit tests, i.e. everything ok I get 'true' in return.