A British woman held in Dubai for describing her ex-husband’s new wife as a horse on Facebook is to be allowed to go home.