Fix war deployments

Because of wrong filenames for non salt:// files it could not deploy the war file properly.

Also, the logic to determine the version was a bit iffy so I have added a different approach of retrieving a version.
Fix linting
Fix lint
Fix lint
Merge pull request #16832 from syphernl/fix/tomcat_wardeploy

Tomcat module: Fixed deploy_war not working and added version retrieval