Check style before running test on travis.

Currently, travis just runs tests.

This patch makes travis checks style before running test, and do not
run tests if style is not suitable.
Treat warnings as errors in scalastyle.

To check whether style is suitable with a command result, all warnings
have to be treated as erros in scalastyle. Because scalastyle returns
zero even though there is a warning.