toolchain: refactored build scripts

Most of the package deps and other complexity has been moved into the
build scripts, instead of being implicity configured in the LXC
templates.