Now it uses the standard QgsVectorLayer.uniqueValues() method where possible so that provider side optimisations are used Also add test, and optimise request when using selected features only