Sort output of dotprint according to args ordering

This makes the output to the dotfile use this ordering (previously it used
len), and also adds the ordering="out" flag to the file (see
http://stackoverflow.com/a/9216782/161801).

I didn't add a way to change the ordering.  The previous one, len, would
roughly order the nodes from biggest to smallest, but not exactly, since it
was a len on the string rather than a len on the nodes.
Merge pull request #2150 from asmeurer/dot-print-sort

Sort output of dotprint according to args ordering