turbopack-cli: modularize code to support turbopack build (#5487)
This work prepares for `turbopack build` by extracting code common
between dev and build, such as asset context.
This also makes the cli accept a variadic list of entries rather than an
unnamed directory parameter. The project directory is now available
under `--dir` or `-d`.
Test Plan: `cargo run -p turbopack-cli dev` with a `src/index.js`
present and `cargo run -p turbopack-cli dev src/entry.js` with
`src/entry.js` present.