A dispute at a sock and underwear factory in Turkey over the firing of union members in response to an organising drive has been resolved thanks to intervention from leading European clothing brands.