Port all build system changes from master to template branch

I just spent several hours in merge hell wrt. PR #40 since our branch niksula:master was built on top of omniti-labs:template, but there have been a lot of changes in omniti-labs:master which are not in template (but also some changes vice versa). There is a problem with the way the omnios-build repository is set up at the moment: changes to the build *system* can happen in any branch (forks/clones are branches too!), and merging between different branches is not directly possible because they also contain build *script* changes -- a workaround is that every branch has to cherry-pick all build system changes from all other branches, but that does not scale and is terribly tedious to do. This PR is a result of cleanup from merging omniti-labs:master into omniti-labs:template and using filter-branch magic to prune commits that touched any directory under build/. This solves the immediate problem of syncing up my branches with master's build system without getting my scripts touched; I just merge the template branch. I submit this PR because I believe this work will be useful to others as well.

Further, it is my opinion that it would be easier for everyone if the build *system* were maintained separately so that all branches/forks could just track omniti-labs:master and merge stuff from there without fear of getting their *scripts* changed. I'd love to discuss options to do that further (on IRC perhaps).