Move extract/fetch code to xbps-packages hooks; add support for do-<phase> hooks.