Make RPCPublisher flush method threadsafe

This change allow concurrent access to the local queue of the
RPCPublisher

Fixes bug #1211736

Change-Id: I13371329d40e43f42c357a0893e4023f343a5efa
Merge "Make RPCPublisher flush method threadsafe"