LGBT refugee wins legal battle to stay in UK