A new medical tampon may be able to detect the earliest signs of ovarian cancer, scientists have said.