Lifetime ratios of beauty hadrons at the next-to-leading order in QCD