Rename InMemoryMetadata to TestingMetadata
Remove useless check in NativeMetadata
Use checkType in NativeMetadata
Fix warnings in MetadataManager