Cleanup: move image depth checks in image/

Signed-off-by: Solomon Hykes <solomon@docker.com>