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.