fix: task definition serialization (#6306)
### Description
A bunch of tiny changes that bring the JSON serialization to be closer
to Go.
We go for a similar approach to Go of having a new structure for
serialization in order to match Go's distinction between `nil` and
`[]string{}`.
### Testing Instructions
More rust codepath integration tests pass. Many failing ones now have
smaller diffs e.g. `dry_json/single_package*.t` only differ by
`hashOfExternalDeps`
Closes TURBO-1548
---------
Co-authored-by: Chris Olszewski <Chris Olszewski>