Add remote hooks to restAdapter.invoke method

Hooks on invoke are needed to use methods like User login/logout 
in the browser with loopback remotely from loopback-connector-remote.
see https://github.com/strongloop/strong-remoting/issues/150
and https://github.com/strongloop/strong-remoting/issues/105
and https://github.com/strongloop/loopback/pull/943