ENCORE: An $\mathcal{O}(N_{\rm g}^2)$ Estimator for Galaxy $N$-Point Correlation Functions