Add OrderedDicts support

Hi, it is a simple change for supporting all types derived from dict or list. OrderedDicts support is particularly interesting. I do not add a test, since it can brake python2.4 compatibility.