Fixes for packaging


These are some generalizations of the build system to support packaging.

We already apply these patches when building the Debian/Ubuntu packages.

xTuple may want to further generalize these things to ensure they are still suitable for non-Linux users too.

Notice that I suggest explicitly passing in some arguments as environment variables when running qmake.  This is the most general solution.  When building in a dev environment using git submodules, the environment variables can be set like this:

```
OPENRPT_DIR=`pwd`/openrpt ... ... qmake
```

and when building a package they can be set:

```
OPENRPT_DIR=/usr/include/openrpt ... ... qmake
```

This switch away from applicationDirPath has the same problem as the similar change to csvimp (see https://github.com/xtuple/csvimp/pull/4 ) - it doesn't work well with the current state of xTuple desktop installers.