`first` now uses a path expression

This allows code like `(= :foo (first x))` to refine they 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 they type of `x`.