Remove pyprotocols, provide replacement for things on the api.

All the replacement functions and classes are marked as deprecated.