Refactor build API and controller

Refactor the build API and validation. Refactor the build controller
to use the upstream cache package where possible. Use watches wherever
possible.
@smarterclayton I got a referral to Dawn Chen. I'll follow up tomorrow. While the polling is unfortunate, I'm at least happy that we can use a queue internally. If we come up with something better we can swap in a new FIFO-feeder.