Minor refactoring and features in rustc driver for embedders

This fixes some pain points I found while working on a tool that embeds rustc. These changes save me from copy-pasting 500 lines from rustc.

Two refactorings:

* `monitor` is public. Need it to run the compiler properly.
* Extracted parsing of the --crate-type argument.

Two minor features:

* The session's Option type takes an `alt_std_name` that can be used to override the crate that is automatically linked as `extern crate std = "name";`. I'm using this for customization.
* `compile_input` takes a `Option<Plugins>` to customize the compiler pipeline programmatically.

Neither of the two new features are exposed via command line flags since their general utility isn't obvious.
Could you adjust the doc comment on this to include something like "initial `cfg` processing, loading of compiler plugins (including registering those specified in `addl_plugins`), syntax expansion, ..."?