TV chef Gordon Ramsay has said he has undergone treatment to remove skin cancer, thanking “incredible” health workers for their efforts.