Build all wars in same place

Previously the QA war was being built in the QA deploy job. This change
builds the QA war in the jenkins.sh script that means it will be built
at the same time as the other wars.

Also, the building of the war is extracted into a function so that we
can cleanly wrap the call to `play war` with other stuff such as
generating and removing the `cron.xml` and moving and unmoving the
production `web.xml`.