IRGen: internalise well known types with static linking
When statically linking the standard library ensure that we emit the
well known metadata and accessors with internal linkage. This fixes a
number of warnings about incorrect DLL storage when building Foundation
on Windows for static linking.