Manually document py3compat module.

Automatic documentation doesn't work well with things that have
alternative definitions inside conditional blocks.
Fix "Source" text for the "Other Syntax" section of the notebook

Before it was shown as the "Display" one because of a missing end of
line.
Replacing a for-in loop by an index loop on an array, to avoid enumerating inherited properties
Merge pull request #4785 from SylvainCorlay/master

Replacing a for-in loop by an index loop on an array
added test for display() calls with metadata

this test is currently failing
propagate display metadata to all mimetypes

This change makes:

    display(SVG(s1), metadata=dict(isolated=True))

behave the same as

    display_svg(SVG(s1), metadata=dict(isolated=True))
back out metadata copying for every mime-type
make output code not drop non-mimetype-keyed json
use non-mimetype-keyed metadata in the outputarea
clear output in-between test runs
passthrough unrecognized output mime-types

preserves the bad mime-type -> short name conversion for supported types,
but allows passthrough for additional mime-types,
so at least data is not discarded.
check mime-keyed metadata first, then top level
distinguish display_svg() and display() tests
use mime type in memory
align with current master
convert short names like 'png' to mimetype names
fix png inlining
stop using convert_to_mime_types

the in-memory representation and the messsage spec now all use mimetype
names for the JSON keys.
convert back to short names when writing to JSON
unify key renaming for to/from json short keys