Improve the deployment of jails

This code improves the management of jails and should pave the way for
things like prefetch, starting and stopping of jails, etc.