[ticket/11445] optimize number of queries in get_global_subscriptions

PHPBB3-11445
[ticket/11445] Add unit test for get_global_subscriptions method

PHPBB3-11445
[ticket/11445] make assert stronger by iterating over $expected_subscriptions

PHPBB3-11445