Refactor the bundler into smaller functions.

This commit includes one small enhancement: targets now have a `name` field with their name ("client", "server", "ctl", etc).  The name isn't currently used in the code, but it's helpful for debugging.

Aside from that, this is all a pure refactoring of larger functions and methods into smaller functions.

This refactoring supports profiling and the faster restart project, but doesn't itself include those enhancements.

The refactoring is a nearly mechanical splitting of larger functions into smaller ones, turning local vars into object fields when necessary.

For building the bundle, which didn't already have an associated object, a new `BundleBuild` object contains the state for building the bundle; it is then thrown away when the bundle is built.  Other local vars were moved
into fields of existing objects.

I took a look at the comment suggesting that Slice and Package should each be split into two objects: PackageSource and SliceSource, and BuiltPackage and BuiltSlice.  I bailed on doing that this time around because
I'd need to dig deeper to understand how slices are being deserialized from disk, but it could still be done later though.