As originally reported in https://github.com/zkat/pacote/issues/175, pacote will leave user-owned files in the global (typically root-owned) install space.  This is arguably much less bad than leaving root-owned files in ~, but still not ideal.
Proposal:
- abstract out the infer-owner.jsutil from cacache into its own module.
- Infer ownership of all files that pacote unpacks.
- Drop the uidorgidoption entirely.
Thereafter, installing in a root-owned prefix will produce root-owned files.  (Or fail with EACCES if the user doesn't have permission to write there.)  Installing in a user-owned folder will produce user-owned files.  No config juggling or baton-passing required.  (Well, Pacote will have to infer the ownership and then pass the uid/gid configs to tar, but that seems pretty reasonable.)