Place cells dynamically refine grid cell activities to reduce error accumulation during path integration in a continuous attractor model