Onset of Irreversibility in Cyclic Shear of Granular Packings