Analysis server code generation improvements

- Make generated code implement the HasToJson interface.

- Add toRequest() convenience methods to classes representing request
  parameters.

- Fix toJson() for objects containing lists (forgot to call toList()).

R=brianwilkerson@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge@39375 260f80e4-7a28-3924-810f-c04153c831b5
Start using code-generated protocol classes in analysis server.

This updates the handlers for analysis.getErrors,
server.setSubscriptions, and analysis.setSubscriptions with simpler
versions that make use of the code-generated protocol classes, and
replaces the classes AnalysisError and AnalysisService with their
code-generated versions.

It also removes some dead code.

R=jwren@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge@39376 260f80e4-7a28-3924-810f-c04153c831b5
Do proper JSON conversion when returning search results.

R=brianwilkerson@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge@39377 260f80e4-7a28-3924-810f-c04153c831b5
Constant-fold field accesses of constructed constants.

Addresses issue 10988, although the motivating example no longer
triggers due to library changes.  Spirodraw has ~600 bytes saving.

R=herhut@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge@39378 260f80e4-7a28-3924-810f-c04153c831b5
Change analysis.updateOptions to use generated classes.

Note that there is a small change in behavior: unrecognized options
are now silently ignored; they no longer generate an error.

R=brianwilkerson@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge@39380 260f80e4-7a28-3924-810f-c04153c831b5