Clean up extending of types in the runtime
Instead of various modules extending a built-in type, all this logic is moved to separate extension modules. This makes it easier to figure out what module defined something, keeps the code more consistend, and gives greater control over the order in which types are refined.