Superintegrability with third-order integrals in quantum and classical mechanics