NLO corrections to the BFKL equation in QCD and in supersymmetric gauge theories