Switch to using std::shared_ptr, with appropriate includes/namespaces.
Add CPP generation for trigger-wrapper functions.
Parameterize serialization method, allowing for alternatives.
Fix minor duplicate semicolon issues.