Add support for specifying a filter function to AggregateSensor
This allows us to use a function to filter out sensors that shouldn't be part of the aggregate.
It's a lot more elegant than mucking about with regular expressions.
This is needed to support changes needed to fix bug 477983
Edited by Arjen Hiemstra