Save ports in `sandbox.ports` by capability name.

- Ports are usable after the sandbox promise resolves.
- Transfered ports are not saved in this way.
Kill dead code.