Generalized Bochner theorem: Characterization of the Askey-Wilson polynomials