Spectral Flow, the Magnus Force, and the Josephson-Anderson Relation