Initial code dump of buildgen

Review Request #2097 — Created April 19, 2015 and updated — Latest diff uploaded

ity, jsirois, stuhood, zundel

Add buildgen to contrib

WIP, not ready for review. But I've said a bunch of times that at worst I would have this code dumped so others can see what's going on. I cleaned this up as much as I had time for, but it's not actually in a runnable state -- I'll chip away at that as I have time. But this is almost identical to what we run internally, which I can confirm works very well. Mostly this just needs a lot of documentation and tests.