Waves and instabilities of a toroidal magnetic flux tube in a rotating star