Sync RPC module from Oslo

Includes backport of change for bug 1175808
Fixes bug 1172922 and bug 1122763

Change-Id: Ib52e9458a9db01e2c8fd2a6d84010733f85980f8
Merge "Sync RPC module from Oslo" into stable/grizzly