Refactor the project structure to make it build as a "Qt module". It's a first step to get this tool closer to Qt.
The main advantage here is: Simply running:
```
qmake
make
make install
```
will compile and install the tool into your Qt installation, and make it a part of your Qt just like any other tool (qmake, etc.)
By using a stable patchelf binary instead of compiling the latest master
from NixOS/patchelf, the crash could be solved.
An issue has been created in NixOS/patchelf attempting to fix this
upstream.
We should think about relying on stable versions (e.g. their tags) in
the future instead of building the master branch, especially since
linuxdeployqt is a development tool that many developers rely on.
* Move testing logic from travis.yml to tests-ci.sh script
This way we can share this logic between travis CI and other systems
like for example a docker container.
* Move logic to create a testing environment to tests-environment.sh
As with the logic to execute the tests, this way we can share this logic
with other systems to tests linuxdeployqt.
* Install Qt also in tests-environment.sh
No reason to keep it separate from the rest as far as I know
* Wait until the X server is up and running
Otherwise we get into a racy situation.
* Add Dockerfile to create a testing container
This container tries to emulate the environment we have in travis-ci,
this way we can test whatever is failing on the CI locally.