support for dealing with multiple registries

Mostly this just means handling the components more consistently with the other pieces of npm, while avoiding unnecessarily canonicalizing package names.