Export using sorted tuples instead of dict

To preserve order of exported XML, for stable diffs.

This changes the export format, so exports need to be re-done.
Here's how I did it:

= Import old-style XML into Plomino <= 1.18.1 =

{{{py

import glob
dirname = 'src/Products.CMFPlomino/Products/CMFPlomino/tests/samples/'
databases = glob.glob(os.path.join(dirname, '*.xml'))

def import_databases():
    for fn in databases:
        print 'importing', fn
        f = open(fn)
        i = os.path.splitext(os.path.basename(fn))[0]
        portal.invokeFactory('PlominoDatabase', id=i)
        db = getattr(portal, i)
        db.at_post_create_script()
        wf_tool = portal.portal_workflow
        wf_tool.doActionFor(db, 'publish')
        xmlstring=f.read()
        db.importDesignFromXML(xmlstring)
        db.refreshDB()

import_databases()

databases = [
    "src/Products.CMFPlomino/Products/CMFPlomino/tests/filestoimport/devplomino.xml",
    "src/Products.CMFPlomino/Products/CMFPlomino/tests/filestoimport/hideWhenTest.xml",
    "src/Products.CMFPlomino/Products/CMFPlomino/tests/filestoimport/multilineDatagridTest.xml",
    "src/Products.CMFPlomino/Products/CMFPlomino/tests/filestoimport/replicadb.xml",
    "src/Products.CMFPlomino/Products/CMFPlomino/tests/filestoimport/with_datagrid_and_overlay.xml",
    ]

import_databases()

xmlstring = open("src/Products.CMFPlomino/Products/CMFPlomino/tests/filestoimport/replicadb-all-documents.xml").read()
print 'importing', fn
portal.replicadb.importFromXML(xmlstring=xmlstring)

}}}

After import, upgrade Plomino to version > 1.18.1

= Export new-style XML from Plomino > 1.18.1 =

{{{py

import glob
dirname = 'src/Products.CMFPlomino/Products/CMFPlomino/tests/filestoimport/'
databases = glob.glob(os.path.join(dirname, '*.xml'))

def export_databases():
    for fn in databases:
        print 'exporting', fn
        i = os.path.splitext(os.path.basename(fn))[0]
        db = getattr(portal, i, None)
        if not db:
            continue
        xmlstring = db.exportDesignAsXML(dbsettings=False)
        f = open(os.path.basename(fn), 'w')
        f.write(xmlstring)
        f.close()

export_databases()

dirname = 'src/Products.CMFPlomino/Products/CMFPlomino/tests/samples/'
databases = glob.glob(os.path.join(dirname, '*.xml'))

export_databases()

ss = portal.replicadb.exportAsXML()
f = open(os.path.join(dirname, 'replicadb-all-documents.xml'), 'w')
f.write(ss)
f.close()
Naming, remove pdb
Merge branch 'jean-order-export' of github.com:plomino/Plomino into jean-order-export