Update connect.py

Fixing a bug on windows 7 32 bit : 

[IPythonQtConsoleApp] ERROR | Could not setup tunnels
Traceback (most recent call last):
  File "C:\Anaconda\lib\site-packages\IPython\consoleapp.py", line 304, in init_
ssh
    newports = tunnel_to_kernel(info, self.sshserver, self.sshkey)
  File "C:\Anaconda\lib\site-packages\IPython\kernel\connect.py", line 364, in t
unnel_to_kernel
    password = getpass("SSH Password for %s: "%sshserver)
  File "C:\Anaconda\lib\getpass.py", line 95, in win_getpass
    msvcrt.putch(c)
TypeError: must be char, not unicode
[IPythonQtConsoleApp] Exiting application: ipython-qtconsole
When calling getpass,
TypeError: must be char, not unicode
move edit_metadata to IPython.dialog
Use cast_bytes_py2 for getpass() prompt
Open pdf after compiling (configurable)
Merge What's New entries from pull requests
Add script to update whatsnew file from PR snippets
Adress comments

 * move file extension addition outside of function
 * move log statement before function call
 * change default to False
 * add postprocessor to nbconvertapp
add Edit Notebook Metadata to Edit menu
Merge pull request #4346 from takluyver/win-kernel-getpass

getpass() on Windows & Python 2 needs bytes prompt
Merge pull request #4348 from jakobgager/openpdf

Call PDF viewer after latex compiling (nbconvert)

Add a configurable to open the pdf after compiling.
Uses the default application.

closes #4291
Merge pull request #4349 from takluyver/update-whatsnew

Script to update What's New file
Merge pull request #4333 from minrk/notebook-metadata

Add Edit Notebook Metadata to Edit menu
remove hardcoded box-orient
Merge pull request #4355 from Carreau/rm-vbox

remove hardcoded box-orient

remove some hardcoded vbox and hbox in html templates, those are not anymore in the notebook-app DOM, in favor oh having the less class inheriting from the corresponding mixin.

This should allow easier pure-css customization.
test_pylabtools also needs to modify matplotlib.rcParamsOrig

closes gh-4335
Merge pull request #4359 from takluyver/i4335

test_pylabtools also needs to modify matplotlib.rcParamsOrig
Expose IPython version in notebook app