vector layer: check that features exist

* added listAllFeatureIds method to remove duplicated code
* check that features id exist in setSelection