Changes to MockSdk to make it usable in linter.
Changes to MockSdk to make it usable in linter.

The goal is to switch linter to analyzer's MockSdk.

R=1f7641b6b14c52b9163524ab8d9aabff80176f21@google.com, pquitslund@google.com

Change-Id: I3bf735ddf82efaaa24ccc07fa8fe7e752dc6d19f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116182
Reviewed-by: Brian Wilkerson <1f7641b6b14c52b9163524ab8d9aabff80176f21@google.com>
Commit-Queue: Konstantin Shcheglov <09e4d7516628963212bf4aace2f97603d2b706e4@google.com>

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