Handle output from hooks appropriately

Update the legacy_formatter to pass messages and embeddings from hooks to formatters, just before
describing exceptions (if any) to formatters.

- [X] Update legacy_formatter to pass hook output to formatters
- [X] Update the JSON formatter/gherkin_formatter_adapter so that it does not crash on Before hook output
- [ ] Update the Pretty formatter to handle the hook output appropriately, the hook output is currently delayed to next step/scenario
- [ ] Update the HTML formatter to handle the hook output appropriately, the hook output is currently delayed to next step/scenario

For instance the Pretty and HTML formatter currently print output from the before hooks after the first step, and output from the AfterStep/After hooks are delayed to the next step/scenario.

The big show stopper is that output from before hooks makes the JSON formatter crash ("[] not defined on NilClass") in the gherkin library. A similar problem when using Cucumber-JVM has already been identified: cucumber/gherkin#289