Move uint_mapping here from Base and fix it for JuliaLang/julia#8420

I also got rid of the manual inlining since the compiler now appears to
inline everything on its own.

Fixes #6. Ref JuliaLang/julia#8539