Measurements of the differential production cross sections for a Z boson in association with jets in pp collisions at $\sqrt{s} = 8$ TeV