Former deputy First Minister of Northern Ireland Martin McGuinness says he is quitting frontline politics to concentrate on recovering from "a very serious illness".