Add CMake config and install targets.

Make it easier for other projects to do find_package by creating config
files both in the build and install tree.