Added auto generation of versioned schemas.

This commit adds a script scripts/generate_schemas.py which downloads
the schema definitions for a given release and converts these into
Python class definitions, which are written to a module private file
_protocol_definitions.py. These definitions are imported by protocol.py
and there is no user-visible change in how the protocol classes are
used.