Remove post_message callback from CreateInstance()

Instead of passing the same callback everytime an instance is created,
we may use the (already provided) SetPostMessageCallback() method.

This is preparation for the next commit, if we didn't this first we
would need to add another callback to CreateInstance to maintain consistency
which would increase the noise generated by the change.
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