catkin_generate_environment: don't overwrite existing .catkin file

The Orocos RTT package, a pure CMake package, currently doesn't _use_ catkin for building, but it does call `find_package(catkin)` in order to determine if catkin is installed on the system, and if so, it calls `catkin_add_env_hooks()` to add an env hook. This works fine if you're installing it to an isolated workspace or somewhere else, but when installing to a develspace (like with `catkin_tools`), it causes the `.catkin` file to be overwritten and you lose the list of all previously-built packages.

This patch replaces the normal CMake `install(FILES ...)` command with an `install(CODE ...)` command which just checks if the file already exists or not.
This code fails when the folder `CMAKE_INSTALL_PREFIX` does not exist: http://jenkins.ros.org/job/ros-indigo-catkin_binarydeb_trusty_amd64/11/console