Merge metadata changes from upstream r714
Generated Python files for metadata
Merge code changes from upstream r714

Note that the Python code isn't updated to use the MatcherApi
interface, for the moment at least -- the Python code tends
more towards functions than methods in the first place.