Add subset / superset method(s) to `Specifier` / `SpecifierSet`
Similar to https://github.com/pypa/packaging/issues/940 this is a follow up to https://github.com/pypa/packaging/issues/776/.
While it may not always be clear how to simplify a SpecifierSet sometimes, when you are resolving, what you really want to know is which Specifier / SpecifierSet is most restrictive. For example if you have to specifiers >1 and >2 you may just want to focus on the >2, so it would be useful to have something like:
>>> Specifier('>2').issubset(Specifier('>1'))
True
That is the universe of versions that match >2 is a subset of the universe of versions that match >1, therefore if any version matches >2 it will also match >1.
While not completely trivial, due to PEP 440 nuances, this is fairly straightforward for Specifier, but probably very tricky for SpecifierSet. I suspect it would be easiest to implement Specifier first and then follow up with SpecifierSet.
My hope is that I can implement https://github.com/pypa/packaging/issues/940 and use the same helper functions for these.
I'd love these, I might even have discussed it before. I'd like to use it for Python versions; asking "is any version of Python 3.12 contained in requires-python" would be very useful.