Make rust crate type customizable

Add an option to the rust checker so the user can set the value of the --crate-type compiler flag. The test checks that flycheck no longer counts `fn main` as unused, as this shouldn't happen when the crate type is "bin".