[RFC] Split common functionality into multiple files.

In preparation for the coverity build type. Added a `require_environment_variable` function to check prerequisites for library scripts/functions (used to check existence of all environment variables that are not defined in the current script file) and removed the question mark from the `is_ci_build` function to avoid problems.

[Travis build](https://travis-ci.org/fwalch/bot-ci/builds/34893487)