Instanton counting via affine Lie algebras I: Equivariant J-functions of (affine) flag manifolds and Whittaker vectors