Rewrite docker rmi

Closes #2312
Fixes #4069 


* if an image has children, tagged or not, we do not delete, -> only untag
* if an image has multiple tags and delete via id, -> delete
* if an image has multiple tags and delete via tag, -> untag
* when deleting an img, if it’s parent has only one child, tagged or not, (img) we try delete the parent with the same rules as above
* docker rmi ubuntu:latest is the same thing as docker rmi 8dbd9e392a96
* docker rmi ubuntu is the same as docker rmi ubuntu:latest (like today)