#4407 added a new crate wasmer-api
for interacting with the backend.
We should migrate the old code in wasmer-registry
that does similar things into the new crate for consistency.
This will also help clean up the wasmer-registry crate, which is very messy at the moment.