Refactoring from #20133 on deletion confirmation Admin (credits to jonash)

This is the refactoring part that has been removed from the ticket #20133 
https://code.djangoproject.com/ticket/20133