Effective action for Regge processes in QCD and in gravity