In detail, this commit:
- Changes the default version that is built to D2, use D_VERSION to override.
- Reverts back to building static libs by default until we are certain shared libs work fine everywhere.
- Fixes installation pathes so that CMAKE_INSTALL_PREFIX is respected; /etc as sysconf dir for /usr prefix is special-cased.
- Fixes out-of-source builds again, and causes temporary files (idgen, …) not to be written to the source directory anymore.
This is a slightly cleaned up version of the changes from #12.