add line number information to more diff-related complaints

Change-Id: I38ecc06bfc8d24f1df89812a8b86bd78970e095b
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
rework complaint reporting

instead of dumping everything straight to stdout, buffer it in a hash
first.
there are multiple advantages:
- in some cases, we'd get line-less complaints only after ones with
  lines, which would look funny. the buffering allows us to sort the
  output.
- different output formats will be easier to implement.
- the output code is cleaner, as it can hold the state more locally.

Change-Id: I0b558ecb58cf4d44a7efbd5a13a79349c55283f9
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
add more line number information to commit message related complaints

Change-Id: Ia90528e1747c7f9ea46418c7814584cc9220d483
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
add gerrit REST output mode

produces JSON object that is accepted by gerrit >= 2.6.

Started-by: Orgad Shaneh <orgad.shaneh@audiocodes.com>
Change-Id: I7e9bf99d18beadac8a715e10e4f241c953442d16
Reviewed-by: Orgad Shaneh <orgads@gmail.com>