Minor improvements to the travis configuration.

This changes some parts of the travis configuration:

* split the `before_script` section into multiple parts
* print the Maven version before actually testing
* set the `--batch-mode` flag as we are running in non-interactive mode
* set the `--threads` configuration to use 2 threads per available cpu core

The `--threads` configuration should also speed-up the travis job.

This isn't ready for review yet, I want to wait whether travis likes these changes.