[mypyc] Import librt.base64 capsule automatically if needed (#20233)
Allow primitives to specify the capsule they need via module name such
as `librt.base64`. This way we can import the capsule automatically only
when there are references to the contents of the capsule in the compiled
code.
Only make the change for `librt.base64`, but we can also do a similar
thing for `librt.internal` in a follow-up PR.