Add tests for the JUnitFormatter to disclose issues

The main issue is that the JUnitFormatter does not handle failures
in the before and after hooks properly. To add flexibility the tests
also specify that the JUnitFormatter should handle both all-steps-first
execution and one-step-at-the-time execution.