Adds a buildError hook

`buildError` hook will be called on when an error occurs during the
`preBuild` or `postBuild` hooks for addons, or when `builder#build`
fails
Merge pull request #2832 from danmcclain/buildError

[FEATURE] Adds a buildError hook