Expose the same services as for vector data on raster layers.
First implementation is simple and uses existing methods in GeoTools, won't work properly on very large rasters, but it's suitable for smaller ones. A subsequent ticket will handle larger cases (by a combination of subsampling, area reduction, and histogram calculations)