Crossover between localized states and pinned Wigner crystal in high-mobility n-GaAs/AlGaAs heterostructures near filling factor $\nu=1$