Fix misc tests on Windows

Completion test used to fail after format_edit_selection test because
teardown of the last one didn't clean up all the data.
Extract teardown_view in format_edit_selection_cmd
Use is_path_absolute() in goto_selected_file()

This partially solves issues with navigation.

Also use copy_str() instead of strcpy().
Use a general function to find the last slash
Merge branch 'handle-backward-slashes-in-menu-item-paths-on-win'

Add handling of paths with backward slashes for :find/:locate/:grep/%M
menus on Windows.

Thanks to Robert Sarkozi.