Java JSONFormatter should record before hooks in next scenario

Cucumber-JVM will call before hooks before scenario() (or background())
is called, therefore the Java JSONFormatter should record the before hooks
in the scenario to be executed next, instead of scenario for which
sceanrio() was called latest.
Let the Java JSONFormatter record before hooks in next scenario

To work with Cucumber-JVM, let the Java JSONFormatter record before
hooks in the scenario for which scenario() is called next.
Cucumber-JVM calls before hooks before scenario() (or background()) is
called on the JSONFormatter, Cucumber-Ruby calls before hooks after
scenario() (or background()) is called on the JSONFormatter. The JSON
parser spec need to be relaxed to work with both the Ruby JSONFormatter
and the Java JSONFormatter.
Merge branch 'json-formatter-before-hooks' of github.com:brasmusson/gherkin
Attribution