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.
I am not sure that it works but have you tried to move the variable into the `install(CODE ..)` block and actually keep `CMAKE_INSTALL_PREFIX` as a variable (escaping the $) to expand it at install time?