Have 'display-buffer-reuse-window' prefer window on selected frame (Bug#36680)

* lisp/window.el (display-buffer-reuse-window): Preferably reuse
window on selected frame (Bug#36680).
* doc/lispref/windows.texi (Buffer Display Action Functions): Say
that 'display-buffer-reuse-window' prefers window on the selected
1 job for master in 5 minutes and 45 seconds (queued for 51 seconds)
Status Job ID Name Coverage
failed #2619


Name Stage Failure
test-all Test There has been a runner system failure, please try again
Using docker image sha256:53534de009dbb803876b35e50500a7860a46e3990cd5bf97192f5e0870e5a6e2 for gitlab/gitlab-runner-helper:x86_64-d0b76032 ...
Pulling docker image debian:stretch ...
Using docker image sha256:5a6d49d5e83399b16a2f365670051f51afd4368bff836de9d70f9bd84dc79f17 for debian:stretch ...
Running on runner-cff9d373-project-1-concurrent-0 via emba.gnu.org...
$ git config --global http.proxy $HTTP_PROXY; git config --global https.proxy $HTTPS_PROXY
Fetching changes...
Initialized empty Git repository in /builds/emacs/emacs/.git/
Created fresh repository.
ERROR: Job failed (system failure): aborted: terminated