allow subprocess output to trigger flush

only affects the case of an idle kernel.

This treats subprocess output the same as background thread output.
ensure load_connection_file works after self.session is created

only write to config if self.session hasn’t been instantiated,
otherwise write to session attrs.
build new Session auth when either key or scheme changes
add Session to ConnectionFileMixin

it’s used in a few places, so it doesn’t make sense for subclasses to lack it
ConnectionFileMixin is a LoggingConfigurable
test loading connection file after instantiating Session
Rework Latex test for nbconvert Python API

Also, skip it if pandoc is not available
Make test robust against differences in line endings

git on Windows can change line endings on checkout, which was leading to
a test failure.
Merge pull request #5866 from takluyver/test-crlf-insensitive

Make test robust against differences in line endings
allow backporting several PRs at once
truncate PR description in backported git msg to five lines

sometimes these things are huge.
Merge pull request #5865 from takluyver/latex-test-fix

Rework Latex test for nbconvert Python API
Catch more errors from clipboard access on Windows
Merge pull request #5869 from takluyver/win32clipboard-catch-more-errs

Catch more errors from clipboard access on Windows
specify encoding in msgpack.unpackb

otherwise, it will leave strings as utf8 bytes
Use TemporaryWorkingDirectory context manager in some tests
Ensure history tests release database before cleanup
Merge pull request #5871 from minrk/msgpack-unicode

specify encoding in msgpack.unpackb
Merge pull request #5872 from takluyver/tmpdir-cleanup-errors

Tmpdir cleanup errors
Ensure history database is closed in test

Hopefully fixes the last Windows test on Python 3.3