The goal of this refactor is to make it easier to integrate buildkit and containerd snapshotters. Commit is used from two places (api and build), each calls it with distinct arguments. Refactored to pull out the common commit logic and provide different interfaces for each consumer. Signed-off-by: Daniel Nephin <dnephin@docker.com> Upstream-commit: daff039049aea6e19a4bda1df2834d14b4198bc0 Component: engine