imagetools: use docker/cli formatting
Use the formatting packages provided by docker/cli to comply with the official formatting documentation.
https://docs.docker.com/config/formatting/
The use of the official formatting packages also fixes the format templating.
Fixes: #1175
@thaJeztah, this isn't finished but I thought it would be good to create a draft PR for some early feedback. I was initially just going to fix the formatting directive, but thought it would be nicer to make use of github.com/docker/cli/cli/command/inspect and github.com/docker/cli/cli/command/formatter. Using the formatting package should result in a lot less duplicate code, and would be consistent with docker/cli.
What are your thoughts?