Add tool for generating a WAR file from a module.

This also extracts the module loading code out of the classpath tool to
a parent class, since the WAR tool needs the same functionality.
Merge pull request #1929 from tobias/war-tool

Add tool for generating a WAR file from a module.