pkg/iotool: Add io tools package with a thread-safe io.Writer

Signed-off-by: Jonathan Rudenberg <jonathan@titanous.com>
host: Fix race in image layer handling

Signed-off-by: Jonathan Rudenberg <jonathan@titanous.com>
test: Use SafeWriter to avoid races

Signed-off-by: Jonathan Rudenberg <jonathan@titanous.com>