abstract out serialization in trace record batch by using VectorAccessibleSerializable. Add ability to retain vectors.