Implement Upgrader API

This PR implements the Upgrader API as outlined in #6. It will be used as base to implement extensions like compression.