add a synchronization after state MODE_SHARE_WITH_LINKED_ACTORS

This patch adds a synchronization between state
MODE_SHARE_WITH_LINKED_ACTORS and state
MODE_SHARE_PUSH_DATA_IN_KEY_VALUE_STORE.

Link: https://github.com/sebhtml/ray/issues/192
Signed-off-by: Sébastien Boisvert <sebastien.boisvert.3@ulaval.ca>