Allow mutable slices in statics.

Fixes #11411
rustc: Move mut slice check to `check_static`

This is a follow-up patch that moves the mut slice check to the recently
added `check_static`

Closes #11411
auto merge of #12742 : FlaPer87/rust/issue-11411-static-mut-slice, r=nikomatsakis

This PR enables the use of mutable slices in *mutable* static items. The work was started by @xales and I added a follow-up commit that moves the *immutable* restriction to the recently added `check_static`

Closes #11411