Moved check for 'has_parent()' in docker containerizer destroy.
Moved check for 'has_parent()' in docker containerizer destroy.

Ideally, we would do this check as the first thing we do after
entering this function. However, the containerizer API currently
requires callers of `launch()` to also call `destroy()` if the launch
fails (MESOS-6214). As such, putting the check at the top of this
function would cause the containerizer to crash if the launch failure
was due to the container having its `parent` field set. Once we remove
the requirement for `destroy()` to be called explicitly after launch
failures, we should move this check back to the top of this function.

Review: https://reviews.apache.org/r/55778/

asamerh4/mesos,dforsyth/mesos,reneploetz/mesos,chhsia0/mesos,verizonlabs/mesos,verizonlabs/mesos,Aman-Jain-14/customizedMesos,andschwa/mesos,neilconway/mesos,jpeach/mesos,jpeach/mesos,kaysoky/mesos,asamerh4/mesos,yuquanshan/customizedMesos,zmalik/mesos,Aman-Jain-14/customizedMesos,abudnik/mesos,andschwa/mesos,asamerh4/mesos,neilconway/mesos,andschwa/mesos,kaysoky/mesos,chhsia0/mesos,jpeach/mesos,Aman-Jain-14/customizedMesos,Gilbert88/mesos,kaysoky/mesos,kaysoky/mesos,reneploetz/mesos,neilconway/mesos,Aman-Jain-14/customizedMesos,dforsyth/mesos,abudnik/mesos,craimbert/mesos,verizonlabs/mesos,dforsyth/mesos,gsantovena/mesos,craimbert/mesos,verizonlabs/mesos,zmalik/mesos,craimbert/mesos,abudnik/mesos,andschwa/mesos,craimbert/mesos,dforsyth/mesos,reneploetz/mesos,Gilbert88/mesos,abudnik/mesos,neilconway/mesos,yuquanshan/customizedMesos,chhsia0/mesos,abudnik/mesos,andschwa/mesos,zmalik/mesos,chhsia0/mesos,kaysoky/mesos,yuquanshan/customizedMesos,Aman-Jain-14/customizedMesos,Gilbert88/mesos,verizonlabs/mesos,gsantovena/mesos,gsantovena/mesos,abudnik/mesos,chhsia0/mesos,kaysoky/mesos,asamerh4/mesos,jpeach/mesos,kaysoky/mesos,reneploetz/mesos,craimbert/mesos,chhsia0/mesos,gsantovena/mesos,zmalik/mesos,dforsyth/mesos,gsantovena/mesos,yuquanshan/customizedMesos,Gilbert88/mesos,neilconway/mesos,verizonlabs/mesos,jpeach/mesos,chhsia0/mesos,zmalik/mesos,jpeach/mesos,neilconway/mesos,neilconway/mesos,reneploetz/mesos,gsantovena/mesos,yuquanshan/customizedMesos,Gilbert88/mesos,craimbert/mesos,yuquanshan/customizedMesos,jpeach/mesos,gsantovena/mesos,yuquanshan/customizedMesos,reneploetz/mesos,zmalik/mesos,andschwa/mesos,Aman-Jain-14/customizedMesos,zmalik/mesos,Aman-Jain-14/customizedMesos,reneploetz/mesos,asamerh4/mesos,verizonlabs/mesos,abudnik/mesos,andschwa/mesos,asamerh4/mesos,dforsyth/mesos,asamerh4/mesos,dforsyth/mesos,Gilbert88/mesos,Gilbert88/mesos,craimbert/mesos