Epidemic spreading and aging in temporal networks with memory