Make element_index() usable in std::tie()
Fixed sort interface

One may now sort std::tie'd vectors directly, without creating a
temporary l-value for the tie.