Simplify complexTypes serialization

Change-Id: Id5725f12c19b64c00b39842104a9a2ef987f5748
Simplify events serialization

Change-Id: I630aa475e4f67946065296cb3cfa902bd885dcb4
Generate code to force compiler expand serialization templates

Change-Id: I4fbf7f67b632140efb4ba6ed8b7f75cc4ee43845