Measurement of the pp→ZZ production cross section and constraints on anomalous triple gauge couplings in four-lepton final states at s=8 TeV