Additionally, add lots of tests for new functionality around statics and `static mut`.
This ensures that private functions exported through static initializers will actually end up being public in the object file (so other objects can continue to reference the function). Closes #13620