Separate out Portage setup code.

This allows establishing a dependency between portage::package and code
that sets up Portage.