Added a training example data structure with a serialization test.