Allow easy overriding of build plugins

Currently, changing the behavior of a snapcraft plugin is a complex task. For cases where I only want to override the source of my part, I have to basically implement the download logic myself. Ideally I would have access to the complete yaml config as a python dict where I would only replace the source of my part and call super().pull().

This approach will actually allow us to practically make the yaml config dynamic with very little hassle.

Below code is an illustration of what I have in mind.

import platform

from snapcraft.plugins import dump


class DumpCustom(dump.DumpPlugin):
    def pull(self):
        if platform.machine() == 'x86_64':
            self.source = 'http://something.com/some_file.zip'
        super().pull()