Add a handful of simple geospatial functions that optimizer will know about.
Generalize handling of spatial joins by the optimizer.
Adjust EXPLAIN.
Update tests.