typechecker: report error codes for hh_client / json (2/2)

Summary: ... when no --from argument is supplied, the error printing
 goes down a different path. After this diff, that path includes the
 error code at the end of the line for the primary error. So:

  <file>:54,56: Invalid argument (Typing[4110])

 The json output also gains a "code" field.

Reviewed By: @jwatzman

Differential Revision: D1537048
typechecker: annotate explode()

Summary: ... it's common enough that it should catch errors. There's one case (empty delimiter) where ##false## is returned, but that's not sufficiently common to matter.

Reviewed By: @jwatzman

Differential Revision: D1536358
Add typechecker support for null-safe method call operator "?->"

Summary: Hack supports instance method calls via the "->" operator, which throws if
the base is null (or any non-object type). This diff adds Hack typechecker
support for null-safe instance methods calls via a new operator "?->".

Method calls using the "?->" operator will return null if the base is null.
If the base is non-null, the "?->" operator behaves the same as "->". For
now using the "?->" operator to access properties not support and will
cause an error at parse time, though support could be added in the future
if desired.

This diff follows the scheme suggested by@jwatzman, where "?->" is
converted into a ternary expression during the naming phase, which has the
advantage that it avoids the need to update typing logic or other code that
works with the naming ast (nast).

Reviewed By: @elgenie, @jwatzman

Differential Revision: D1524942