Implements support for specifying multiple ranges.

This is backwards compatible with earlier integrations.
Also adds a basic test and a test for the ranges integration.

You can now run:
clang-format -offset=42 -length=15 -offset=150 -length=22
To re-format the ranges (42, +15) and (150, +22).

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@174378 91177308-0d34-0410-b5e6-96231b3b80d8
Adds JSON output for replacements, to simplify tools integration.

Using -output-replacements will now output the replacements instead
of the changed code. This allows easier integration with tools that
need full control over what changed.

The format is an array of objects with the members "offset" (number),
"length" (number) and "replacement_text" (string), for example:

[
  {
    "offset": 42,
    "length": 5,
    "replacement_text": "  "
  },
  {
    "offset": 105,
    "length": 4,
    "replacement_text": ""
  }
]

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@174382 91177308-0d34-0410-b5e6-96231b3b80d8