Features/codegen

First part of updates to code generation:
* Split out backend from REST interfaces to allow backend to be replaced by a DB.  
* Replace Strukt with template-based system (cog)
* Update build system to use the new code generation

These changes should not change any runtime activities, at this stage they are purely preparatory for future replacement of the backend.