Build system updates for CMake 3, including work-around for CMake 3.0.0 bug.

There are some clumsy changes for the demos and tests. The demos and tests havev their own stand-alone CMakeLists.txt file (i.e., that call find_package(DOLFIN)), but DOLFINConfig.cmake includes a CMake generated files that is not ready when the demo directories are added.