metadata: add Metadata interface and wrapper implementation