The package-install function calls some initalization functions from
within the interactive form. This can cause it to fail when called
non-interactively.
package-refresh-contents calls package-read-all-archive-contents so we
don't need to call it explicitly.
Fixes#1389