Complementarity and quantum erasure in an atom interferometer