Dynamics of A Single Population Model with Memory Effect and Spatial Heterogeneity