The big block in getRetvalDeclarationForType is just direct cut/paste from CGCallGenerator plus the addition of the sequence case. The IDL parser changes were OKed by khuey; they're needed so that we don't have to worry about the ordering of sequence with conversions for strings and primitives.
There are two parts to this change:
1) Sequences and arrays are now distinguishable from all non-callback interfaces.
2) To handle that change, overload resolution first tries to convert to the exact
interface, and only if that fails tries to convert things with indexed properties
to sequences or arrays.