getWrapperMetaData() for UserFile returns StreamWrapper object.

Summary: Change getWrapperMetaData() to return Variant type.
Passing vfsstream tests.
Closes https://github.com/facebook/hhvm/pull/4149

Reviewed By: @sgolemon

Differential Revision: D1663533

Signature: t1:1663533:1415302687:10861880d59f5376d9579b36f1dd3f03572c2481
Make hh_server use relative paths.

Summary: This allows us to save hh_server state on one machine, distribute
that saved state to other machines, and load a new hh_server there from the
saved state but with a different root directory.

I have verified (i.e. written tests) that demonstrate that typechecking still works
after restoring from a saved state. hh_format has been tested too. However, more
work may be required for the IDE services.

Reviewed By: @elgenie, @jwatzman

Differential Revision: D1654587

Signature: t1:1654587:1415297603:87d57901bed43b16cd966fa95eff223c1ad53cc3
Convert GuardLoc and friends to DELEGATE, add ARM lowering pass

Summary: This is the first time we need a lowering pass for ARM, as we start generating
cmp{b,l}im vasm opcodes. The implementation is very simple. vasm is super well
coded!

Here's a possible issue. I tried converting DbgAssertRefCount, but I found it
generates suboptimal code when run through the x64 backend + the lowering pass.
It does two cmplim's, so it loads the refcount, does the -127 comparison, and
then loads the refcount again to do the other check. The native ARM
implementation does the smart thing and only loads the refcount once. I worry
this kind of suboptimality is going to appear in a lot of places as we continue
doing this conversion. It may not end up being a real problem but I'll keep an
eye out for it.

Reviewed By: @edwinsmith

Differential Revision: D1662260
Refactor ClientStart to make adding new options easier

Summary: ClientRestart is basically a thin layer over ClientStart; it's not
very useful to give it its own env record type. Using the same record type
also means that we don't have to manually copy the fields from one record to
another, and it makes it less awkward to add extra fields to ClientStart.env.

Also, I made start_server take a single env record so adding new fields to
ClientStart.env won't require modifying the signature of that function.

Reviewed By: @jwatzman

Differential Revision: D1663410

Signature: t1:1663410:1415299128:2184017f1ade82932186a71b92b950993c62d4aa
Make integration test restore state at a different root directory

Summary: Also modify the way we check test results -- instead of stripping off the root prefix of the file paths in the test output, we fill in what the root should be in our expected output. Thus the test ensures that we are not saving the wrong absolute paths to disk.

Reviewed By: @jwatzman

Differential Revision: D1654589

Signature: t1:1654589:1415139391:64e0e1afc254878a7a0fdc6b19f733897f57c41c
Save and restore search state correctly.

Summary: This involved de-functorizing SearchUtils because OCaml's type
inference across modules is kind of janky. In particular, it could not
be convinced that Fuzzy.SUtils.term and HackSearchService.SUtils.term
were the same type.

Reviewed By: @elgenie, @jwatzman

Differential Revision: D1658166

Signature: t1:1658166:1415147857:5d6661e3c2a56e1b8f7ade55e5f09bbe302199cd
Separate client- and server- side options in the build process.

Summary: I am going to add an additional field to ClientBuild.env, and I don't
want to duplicate it unnecessarily on the server side.

Reviewed By: @jwatzman

Differential Revision: D1663412

Signature: t1:1663412:1415299227:a6bc7f9846e9ff7e2e557c999f4e371886102d60
Add tests for the other IDE services.

Reviewed By: @jwatzman

Differential Revision: D1658440

Signature: t1:1658440:1415142872:bb1d929ec344b99c6e38c9cf3334042b6bcd9dde