Json formatter

Bringing together JSONFormatter fix and the tests that have been written by the community into a single pull request. 

I have verified the test prove the fix works and also verified the fix is effective for the problems I see in cucumber-jvm json reports not having results in the step definitions. 

This would be very helpful to make the cucumber reporting plugins accurate to the actual test results.