tools: generate template.h in build folder
The template.h is generated when building the rtr tools.
The resulting file is now create in the build and not the
source directory. This avoids that template.h shows up in
`git status` and also that someone might commit the file
in to the repo by accident.