Lattice Gauge Theory, Orthogonal Polynomials and q-Hypergeometric Functions