[KARAF-3026] Add a dependency="true" flag on feature dependencies
Improve the heuristic for sorting candidates based on mandatory resources