catch unicode error listing profiles

there can be garbage files on the filesystem, and we shouldn't be bothered by them.
Explicitly state what version of Pandoc is supported in the docs.
limit random ports to positive values
catch EACCES when binding notebook app

can come up for low ports on *ix, or user access control restrictions on Windows.

closes #4308
fix initial sys.path

recent change caused initial sys.path to lose '' as the first element in the notebook.

closes #4317
test first element of sys.path in Kernel

both when `--profile-dir` is specified, and when it is not.
Deleted commented addthis toolbar.
Deleted loading of addthis-specific js file and other references.
Use the with statement to open a file.
Remove unused loop variable.
Avoid using a temporary variable by returning the value directly.
Merge pull request #4315 from jdfreder/docs_pandoc_version

Explicitly state what version of Pandoc is supported in docs/install
Merge pull request #4318 from minrk/sys.path

fix initial sys.path
Merge pull request #4327 from abhinav-upadhyay/use-with-to-read-file

Use the with statement to open a file.
Merge pull request #4324 from damianavila/remove_addthis

Remove commented addthis toolbar
Merge pull request #4314 from minrk/eaccess

catch EACCES when binding notebook app

can come up for low ports on *ix, or user access control restrictions on Windows.

closes #4308
Merge pull request #4264 from minrk/unicode-list-profiles

catch unicode error listing profiles
use simple replacement rather than string formatting in format_kernel_cmd

closes #4334

candidate for backport
adjust default value of level in sync_imports

and value check for <= 0 instead of just -1.

Python 3 no longer allows negative values (relative or absolute),
and we should have always allowed 0 to work anyway.

closes #4296
fix mathjax download url to new GitHub format