Allow Debian/Ubuntu repository mirror and proxy to be passed
as environment variables to chroot create script.
Code layout changes and use SQL 'USING' where possible.