Further improvements to component selection rules infrastructure

- Moved rule processing into a separate class
- Version matching is now a built-in selection rule
- Custom rules that don’t require metadata are applied before version matching that requires metadata