Add missing function from upstream winchan

We don't need this extra function and it will make include.js
larger by 2764 bytes (1040 bytes after gzip).

However, this increase the maintenance cost and makes it more
likely that someone updating our version of winchan (for example
to fix a security bug) will miss the other copy of it. I made that
mistake and was lucky that @jrgm caught it. I propose we only
have one copy of winchan in the repo.
Remove duplicate copy of winchan

The script that creates include.js will now use the copy of
winchan that's in common/js/lib/ and used by the dialog.