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.
Travis says this line is >100 characters.