Move some cloudproc templated implementations to the header file

Cherrypicked commit that moves some templates into the header file. This seems to fix the issue with `import cloudprocpy` failing.