Loosened the CLI restriction in RequestContext::importScopedSession()

* Jobs can be run via HTTP runners rather than just CLI ones.
  The old check breaks jobs run on HHVM fcgi runners for example.
* Always check the validity of the IP for sanity.

Change-Id: I1d03c2ab6628b2d124bc7b9f6936788dea22e3e4