Clean up and merge optimizations of local index selectivity and spatial predicates push down to the main repo.