Symmetric coupling of angular momenta, quadratic algebras and discrete polynomials