Sheaves and representation theory of affine Hecke algebras