Implement search-by-type behaviour for TreeViews

Typing will start the search, pressing the up/down arrow keys will jump
to the next or previous match.