Make KeyError from 'get_metadata' more flexible.

Allow subclasses to define a 'CUSTOM_METADATA_FIELDS' mapping which
maps field name -> accessor name, and use it to generate more meaningful
error message when raising KeyError for those fields.
Merge pull request #339 from tseaver/get_metadata-map_accessors

Make KeyError from 'get_metadata' more flexible.