make trailing commas optional in format_hack

Summary: now all the tests pass and generate php that parses correctly
Depends on D1567229

Reviewed By: @paroski, @pikatchu, @elgenie

Differential Revision: D1568966