Unic to buy semiconductor testing company Xcerra for $580m