A unified recipe for deriving (time-uniform) PAC-Bayes bounds