Revert usage of "short" namespaces in use directives.

We started using partially-qualified names as an experiment but we are
reverting to using fully-qualified names + aliases in use directives.
[bin] Fix broken rendering of "use ... as ..." in output.
[bin] Handle duplicate class names or aliases in same namespace.

This condition can occur when merging multiple class files (with their
own independent "use" directives) in one big file: when imported class
names or aliases clashes, the script now tries to automatically rename
them by defining a new alias in the "use" directive and renaming the
occurences in the buffer containing the class code.

This fix is naive at best, but seems to work fine so we will just live
with it for now.
[bin] Drop extension from scripts in the bin directory.
Merge branch 'v0.9/fix-bin-scripts'