Measurement of the Gd-Gd exchange and dipolar interactions in Gd0.01Y0.99Ba2Cu3O6