Support extending into selector pseudoclasses

This fixes #1100. It also adds some infrastructure (most notably `CommaSelector.superselector?` et al) that will be useful for supporting selector functions.