initial implementation/test for IndexedPiece.metadata
finished IndexedPiece.metadata implementation.