Fix for topic hierarchy

If top level topic is empty (all subscribers were unsubscribed), `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.

Steps to reproduce:
 - add high level topic subscriber (`'file:created:test'`)
 - add low level topic subscriber (`'file:created'`)
 - remove high level topic subscriber (`'file:created:test'`)
 - publish high level event (`'file:created:test'`)