Add SetSyncReplyCallback() method

This will allow to a handler to be set to deal with Sync Callbacks,
the main difference with the "old" way is that now there's no restriction
that the reply must be set during the SyncMessage handler.

As we can have at most one pending reply per instance, it makes sense to
keep the pending replies in the same struct as the instances map.
browser_test: Add a test for SyncMessage delayed reply