Fixing google-chrome bug and maybe bugs in other browsers

google-chrome requested /favicon.ico for every page loaded. So last-request-uri contained wrong value  and refresh-request-p didn't work properly.
Code also should fix possible bugs with undocumented requests in other browsers.
Bug is covered in https://github.com/html/weblocks-selenium-tests (just set google-chrome as selenium browser in settings), to reproduce it refresh page when dialog is showing.