Introduce common/hooks to implement hooks at specified phases.

xbps-src will soon move some stuff to the common hooks directory.