Wait for expected messages in listener pool test

In the listener pool test, we must wait that all expected messages
have been receive before stopping the listener.

Closes bug: #1397338

Change-Id: I5e4b39b54e3b99c014f5f9c77926108b90f94192
Merge "Wait for expected messages in listener pool test"