UK wins Brexit transition deal in return for Irish vow