Implement :nth-child, :nth-last-child, :nth-of-type, :nth-last-of-type, :first-of-type, :last-of-type and :only-of-type Selectors Level 3 pseudo-classes
:nth-child and friends, changes in response to SimonSapin's review
:nth-child and friends, use div_rem result instead of recomputing it
auto merge of #1318 : therealglazou/servo/therealglazou/nth-pseudos, r=SimonSapin

Implement :nth-child, :nth-last-child, :nth-of-type, :nth-last-of-type, :first-of-type, :last-of-type and :only-of-type Selectors Level 3 pseudo-classes. Reftests included.