Function synchronization utility

The patch introduces a wrapper for an asynchronous function call that turns
this call into a synchronous one. The wrapper assumes that the called function
immediately returns an object for which it takes some time to get to the
'ready for use' state.

Change-Id: I5a9182e2218112b65b58f478d1d5b51f58b05e16
Merge "Function synchronization utility"