Fix wrong name of the test in cmake

Probably just copy&paste error (bench_quickopen -> bench_itemrepository)
Remove dead code.
Fix porting bug: check for activity in TextDocument::activeTextView.

We might have multiple views of a document, but only one has focus,
so return that one as active. Otherwise, fall-back to any visible
text view. As a last-resort, even return invisible views.

This fixes the cursor positioning while debugging, where we have
multiple views in different areas.
Strip input URL of trailing slash.

This is required to properly print the fileName in the header, which
would otherwise be empty when we want to open a directory.
plugins/filetemplates: rename according to test naming scheme

    testgenerationtest -> test_generationtest
REVIEW: 121454