Move RPC helpers.

BUG=
R=chrisha@chromium.org

Review URL: https://codereview.appspot.com/163330043