Refactor tinkergraph metadata reader and writer code to separate classes

Add tests for tinkergraph metadata reader and writer classes