Pancurses returns different key codes for "Enter" in the normal area
('\r'), and the one in the numpad ('\n'). Cursive only interpretes '\n'
as Enter, and leaves '\r' as CtrlChar('m'), which is different than
that with NCurses on Linux, and makes 'Enter' key not trigger a clicked
event on buttons.
* Add a sort method to SelectView, to easily sort all contained items lexicographically by their label.
* Add more sort methods to SelectView, bringing the API up to parity with Vec (except SelectView does not expose _unstable_ sorting).
* Rename SelectView::sort to sort_by_label to make it clear that it does not sort by the ordering of the items.
* The Ord implementation for select_view::Item is not necessary.
* Implement a SelectView::sort method for when the item values are orderable.
* Add Backend::print_at_rep and make Printer::print_hline use it.
This avoids a string allocation in `print_hline` and makes it faster, presumably for all backends.
This speeds up the rendering of the background in StackView.
* Fix a bug in how Printer::print_hline computes the repetition count.
Moved most View-trait-performing-functions outside of `scroll::Core`
into `scroll::raw`.
Added a `Scroller` trait and convenience methods like `scroll::layout` to
weave the borrows appropriately.
Iterating graphemes with `text.graphemes(true)` is somewhat expensive due to the complexity of unicode.
However, we were doing it _twice_ in the `Printer::print` method in order to truncate the input text to fit the content area.
This changes that method to track the width of the intput text, and only do the grapheme iteration when truncation is actually necessary.