Fixed wrong subscriptions being removed after cancel.
Refactored the `MessageBroker` and the `Subscriptions` to not juggle with types of their properties.
Added tests for not covered branches.
Updated dependencies.