Nonbinary quantum codes from constacyclic codes over polynomial residue rings