`first` now uses a path expression

This allows code like `(= :foo (first x))` to refine the type of `x`.
Rename FirstPE to NthPE

Since it no longer can be assumed to operate on the first item, we
also add an index identifying the item. This index is not used yet.
`second` now uses a path expression

This allows code like `(= :foo (second x))` to refine the type of `x`.
`nth` now uses a path expression

This allows code like `(= :foo (nth x 5))` to refine the type of `x`.