The rescaled Pólya urn: local reinforcement and chi-squared goodness-of-fit test