Since Vim8 we have win_getid() and getwininfo() functions to get
information about the current window. So we can use those functions to
find out, whether the current window is a quickfix or location list
window.
This avoids using a redir() over the :ls command and trying to
manually match the string quickfix and should be faster and also be more
robust, as the redir may fail if done recursively.
fixes#1319
When using a non-english locale, the name of the Quickfix window can change, making the detection of Quickfix vs Location list fail.
E.g., my locale is set to italian and the Quickfix window's name is `[Lista Quickfix]` rather than `[Quickfix List]`.
This change generalizes the pattern used to detect the Quickfix window.