Add Imenu support for rust-mode.

+ Delete trailing whitespace.
auto merge of #10797 : pradeep90/rust/rust-mode-changes, r=brson

+ Delete trailing whitespace.