Moved the package trimming code from build_rootfs to build_package.

This results in much smaller packages, faster package download and a cleaner file system, even when many packages are installed.