Final report of the E821 muon anomalous magnetic moment measurement at BNL