fixed topic hierarchy

If top level topic is empty (all subscribers were unsubscribered),
messages[topic] is empty Array. So function messageHasSubscribers will
return false, because topic found and have 0 subscribers, so here will
not be check for lower topic levels.
making tests happy
Merge pull request #37 from codio/fix_topic_hierarchy

Fix for topic hierarchy