fix 10468, propagate optimization level as rustc::driver::session::OptLevel
auto merge of #10526 : itdaniher/rust/master, r=pcwalton

This commit fixes issue #10468.

It propagate optimization level from PkgSrc to compile_crate as a rustc::driver::session::OptLevel enum.

The 'opt' argument to compile_crate was previously hardcoded as boolean false, such that calls to session::options would always result in the session::No flag being used.