Also adjust `RuntimeMetadataResolver` to be able to use it. Also rename `RuntimeMetadataResolver` into `CompileMetadataResolver`. Closes #8313