trim.sh: Work-in-progress container reduction script

Dump everything except @world and it's runtime dependencies (and dump
the Docker history too) to get a container down to a reasonable size.