Fix bug with hh_format --diff duplicating some lines.

Summary: Off by one (consumed newline) error.

Reviewed By: @elgenie

Differential Revision: D1744556
Don't add trailing commas in template parameter lists

Summary: Typehint lists with trailing commas are not universally accepted, e.g
  (function(int,):void)
is OK, but
  MyClass<int,>
is not.

Reviewed By: @elgenie, @dlreeves

Differential Revision: D1744710
Don't add trailing commas in used trait lists

Summary: Another place where trailing commas don't work (in runtime, Hack is happy with this):

"Hit fatal : While autoloading class [...] from [...]: syntax error, unexpected ';'"

Reviewed By: @int3

Differential Revision: D1746379