WIP: Template version for Metric and Optimizer Classes

Change-Id: I8525555a01316ab60c3e36578d47955995bbefb6
WIP: Template version for TransformIO and TransformIOFactory classes

Change-Id: If55fcd401fcc9373cba2e0749e27e3c2fa4b2cd1