Sort IDL definitions in Perl, so in order in JSON

There's one difference between JSON files from the Perl parser and the
Python parser, namely Promise.idl.

This CL fixes it (by adding a sort), so the JSON is exactly the same.


The difference is b/c Perl lists definitions in the order of definition,
while Python lists them in alphabetical order.
The only case where these differ is Promise.idl, which has two callback
functions in non-alphabetical order.
They're in this order upstream, and this is allowed, hence not changing
the IDL file:
https://github.com/slightlyoff/Promises/blob/master/Promise.idl

The fix is to sort the definitions (within a type: callback functions,
enumerations, interfaces). Do this for each type of definition, for
consistency, though in practice this will generally be a nop (only 1 interface
and usually no enumerations or callback functions).

(We're *not* sorting interface members, as these need to appear in order,
due to overloading.)

Review URL: https://chromiumcodereview.appspot.com/19458004

git-svn-id: svn://svn.chromium.org/blink/trunk@154894 bbb929c8-8fbe-4397-9dbb-9b2b20218538