A Complexity Dichotomy in Spatial Reasoning via Ramsey Theory