Refactor summary IDL generator.
Refactor summary IDL generator.

I need to make changes to 'collectApiSignature' and 'flushInformative'
to support variants, and we have lots of code around already.

R=brianwilkerson@google.com, 72d414e3a99fb120308437779d51667bcc0984eb@google.com

Change-Id: I9ba3b61a22b9e9e2c547e97d5c5adaa07443b24a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103552
Reviewed-by: Paul Berry <72d414e3a99fb120308437779d51667bcc0984eb@google.com>
Commit-Queue: Konstantin Shcheglov <09e4d7516628963212bf4aace2f97603d2b706e4@google.com>

dartino/dart-sdk,dartino/dart-sdk,dart-lang/sdk,dart-lang/sdk,dart-archive/dart-sdk,dart-lang/sdk,dart-archive/dart-sdk,dart-archive/dart-sdk,dartino/dart-sdk,dartino/dart-sdk,dart-lang/sdk,dart-lang/sdk,dart-archive/dart-sdk,dart-lang/sdk,dartino/dart-sdk,dart-archive/dart-sdk,dartino/dart-sdk,dart-archive/dart-sdk,dart-lang/sdk,dart-archive/dart-sdk,dartino/dart-sdk,dart-archive/dart-sdk,dartino/dart-sdk,dart-archive/dart-sdk,dartino/dart-sdk,dart-lang/sdk