Use Stefan Birkner's lib-parent as parent POM.

This parent POM provides up-to-date versions of plugins and configures
the plugins that are needed for releasing the library at Maven Central.
Reformat code.

Apply code format to EditorConfig, which has been introducec in
73f81ae95e402372d3c742a359b0e1b4214801d6. This avoids that the editor
changes unmodified code while implementing a feature.
More to TestWatcher from ExternalResource.
Add log-on-failure mode with tests.
Apply pull request suggestions.
Fix import order.