Generalize estimator code to also work with expressional indexes

Improves raster selectivity estimator (#2839)
Includes regression tests

git-svn-id: http://svn.osgeo.org/postgis/trunk@12814 b70326c6-7e19-0410-871a-916f4a2858ee