Update parallel_emerge to support --workon.
Update parallel_emerge to support --workon.

Packages specified as workon packages are always built from source.
Dependencies of workon packages are also built from source.

Dependencies are calculated with --selective=n so that workon packages will be included in the install list. Packages that are not being worked on and are being unnecessarily replaced because of --selective=n are filtered out later.

This patch also fixes a bug with world file updating -- previously the world file was never updated because the packages were getting removed by RemoveInstalledPackages. We now keep the appropriate world file updates, and instead update SanitizeTree to handle world file updates without trouble.

I also optimized the cycle cracking algorithm so that it only visits each node once. This seems to improve run time significantly on graphs that have cycles.

TEST=Ran ./parallel_emerge -uDNvpg --board=x86-generic chromeos --workon=chromeos-chrome &&
         ./parallel_emerge -uDNvpg --board=x86-generic chromeos --workon=libcros &&
         ./parallel_emerge -uDNvpg world --workon=libxml2 &&
         ./parallel_emerge -uDNv -p world hard-host-depends --workon='bcel'
BUG=none

Review URL: http://codereview.chromium.org/2959006

BugRoger/scripts,endocode/scripts,coreos/scripts,andrejro/coreos--scripts,glevand/coreos--scripts,andrejro/coreos--scripts,mjg59/scripts,crawford/scripts,smilart/scripts,bcwaldon/coreos-scripts,nicescale/scripts,mischief/scripts,BugRoger/scripts,vmware/coreos-scripts,glevand/coreos--scripts,andrejro/coreos--scripts,smilart/scripts,bcwaldon/coreos-scripts,gtank/scripts,zhang0137/scripts,BugRoger/scripts,crawford/scripts,mischief/scripts,marineam/coreos-scripts,fivethreeo/scripts,nicescale/scripts,crawford/scripts,bcwaldon/coreos-scripts,endocode/scripts,nicescale/scripts,gtank/scripts,marineam/coreos-scripts,gtank/scripts,mjg59/scripts,vmware/coreos-scripts,marineam/coreos-scripts,fivethreeo/scripts,zhang0137/scripts,zhang0137/scripts,sigma/coreos-scripts,endocode/scripts,trnubo/scripts,mischief/scripts,fivethreeo/scripts,trnubo/scripts,coreos/scripts,sigma/coreos-scripts,mjg59/scripts,vmware/coreos-scripts,trnubo/scripts,sigma/coreos-scripts,smilart/scripts