Extensions of the RandomAccessCollection protocol provide two
mutually-incompatible default implementations for 'indices', one of
which uses DefaultRandomAccessIndices<Self> and the other uses
CountableRange<Index>. Type witness inference (rightly) considers the
two ambiguous, although it didn't before, causing regressions.
Remove the same-type constraint
SubSequence == DefaultRandomAccessIndices<Self>
from the most general extension, so that the more-specialized,
CountableRange version is selected when it's constraints are met, and
the most-general version is selected otherwise.
The down-side to this change is that the most-general version of
'indices', which produces a DefaultRandomAccessIndices<Self>, will be
available in all types that conform to RandomAccessCollection, even if
they have a different Indices type.
This revises and expands on documentation for the new collection methods
for working with indices and the revised Swift 3 set APIs. In addition,
it includes documentation for the new range types.