This is a roll forward of D102679.
This patch simplifies the implementation of Sequence and makes it compatible with llvm::reverse.
It exposes the reverse iterators through rbegin/rend which prevents a dangling reference in std::reverse_iterator::operator++().
Note: Compared to D102679, this patch introduces a asSmallVector() member function and fixes compilation issue with GCC 5.
@Quuxplusone @mehdi_amini Introducing the asSmallVector() method add a dependency in Sequence.
I'm having a hard time evaluating the costs/benefits balance of this move.