Refactored entering the chroot in the container launch.
Refactored entering the chroot in the container launch.

Hoisted the platform-dependent chroot code out into a helper function
to improve readability. Improved the error message to always include
the rootfs we attempted to enter.

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

Gilbert88/mesos,gsantovena/mesos,dforsyth/mesos,andschwa/mesos,reneploetz/mesos,reneploetz/mesos,abudnik/mesos,jpeach/mesos,zmalik/mesos,reneploetz/mesos,Gilbert88/mesos,Gilbert88/mesos,jpeach/mesos,andschwa/mesos,chhsia0/mesos,andschwa/mesos,dforsyth/mesos,dforsyth/mesos,gsantovena/mesos,chhsia0/mesos,asamerh4/mesos,gsantovena/mesos,chhsia0/mesos,abudnik/mesos,Gilbert88/mesos,andschwa/mesos,zmalik/mesos,gsantovena/mesos,kaysoky/mesos,kaysoky/mesos,jpeach/mesos,Gilbert88/mesos,kaysoky/mesos,chhsia0/mesos,reneploetz/mesos,asamerh4/mesos,kaysoky/mesos,kaysoky/mesos,andschwa/mesos,Gilbert88/mesos,asamerh4/mesos,reneploetz/mesos,zmalik/mesos,chhsia0/mesos,zmalik/mesos,asamerh4/mesos,andschwa/mesos,gsantovena/mesos,dforsyth/mesos,kaysoky/mesos,asamerh4/mesos,jpeach/mesos,dforsyth/mesos,jpeach/mesos,jpeach/mesos,reneploetz/mesos,reneploetz/mesos,andschwa/mesos,zmalik/mesos,zmalik/mesos,jpeach/mesos,abudnik/mesos,abudnik/mesos,asamerh4/mesos,dforsyth/mesos,dforsyth/mesos,gsantovena/mesos,asamerh4/mesos,gsantovena/mesos,abudnik/mesos,abudnik/mesos,chhsia0/mesos,zmalik/mesos,abudnik/mesos,Gilbert88/mesos,kaysoky/mesos,chhsia0/mesos