MotoGP champion Marc Marquez says he will retire - days after clinching a record-equalling eighth title.