Additionally, add lots of tests for new functionality around statics and `static mut`.
This addresses the ICE from #13763, but it does not allow the test to compile, due to #13768. An alternate test was checked in in the meantime. Closes #13763