DATAREDIS-245 - Prevent Excessive Thread creation in tests.

Rewritten testPubSubWithPatterns in order to make it pass reliably by keeping the original test semantics.