Chiral algebras of class S and symplectic varieties