Deployment: Use build data rather than environmental variable to check whether build is a pull request

This is slightly more secure as it prevents pull requester for simply setting `$TRAVIS_PULL_REQUEST=false` and shortens the build script for pull requests by several lines.