Refactoring docgen to make it more unit testable.
Refactoring docgen to make it more unit testable.

broke up a few other functions to be smaller and only do one thing (mostly).

separated documentLibraries into 3 smaller functions that returns things so that it can be unit tested.

BUG=
R=efortuna@google.com

Review URL: https://codereview.chromium.org//17893008

git-svn-id: c93d8a2297af3b929165606efe145742a534bc71@24486 260f80e4-7a28-3924-810f-c04153c831b5

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