A 15-year-old girl who was sentenced to 100 lashes for engaging in premarital sex has had her punishment overturned by a Maldives court.