Cleanup: move image depth checks in image/

Signed-off-by: Solomon Hykes <solomon@docker.com>
Merge pull request #7589 from shykes/cleanup-img-depth

Cleanup: move image depth checks in image/