Don't dismiss rename dialog until rename is complete

- draws error message in the same dialog,
rather than triggering a new dialog via events.

- `Notebook.rename` returns the contents Promise, rather than registering its own error handler.
A Union Traitlet
Allow for trait types like Type or Instance
Test for Union Traitlet
validate -> _validate
resolve classes
Overload __or__ on traitlets and add a test
Use os.remove instead of shutil.rmtree if we try to remove a symbolic link

If we try to remove a symbolic link to a directory with shutil.rmtree, we get
the error “Cannot call rmtree on a symbolic link”
fix clientside notebook manager and assume tree is dir by default

Assume tree url are dir by default instead of file, and if
not do a redirect. Usefull for Clientside manager where the server
does not know the content of the drive, and think that everythong exists.
Catch if module file is not set

When loading .net assemblies after import clr, the file attribute is present but not set, causing the autoreload module to not work appropriately.
Fix conversion of input area to stream output

Closes gh-6983
Merge pull request #6985 from ajholyoake/master

Catch if module file is not set (issue #6984)
Merge pull request #6980 from jasongrout/nbextension-symlink

Use os.remove instead of shutil.rmtree if we try to remove a symbolic link
Clean up promises code some more.
Merge pull request #6975 from minrk/rename-error

Don't dismiss rename dialog until rename is complete
Simplify error-handling code

Thanks to @jdfreder for this change.
Merge pull request #6987 from takluyver/i6983

Fix conversion of input area to stream output
Merge pull request #6982 from Carreau/ksm

fix clientside notebook manager and assume tree is dir by default
Merge pull request #6988 from jasongrout/promises-again

Clean up promises code some more.
Some cleanup unused code and missig use-strict