Aberdeen have confirmed midfielder Stephen Hughes has been released from his contract 12 months early.