A pill commonly used to treat fungal nail infections could cure bowel cancer, research suggests.