Make `rust-mode` derive from `prog-mode` if available
auto merge of #7948 : roysc/rust/master, r=pnkfelix

This let rust-mode be classified as a programming mode, which is only relevant to Emacs 24.x. This way, for one thing, `prog-mode-hook`s will be run when entering `rust-mode`.