[TIMOB-12169] Create build log with compilation

Resolves https://jira.appcelerator.org/browse/TIMOB-12169
We should move all logging functionality out of `builder.js` and into `build.js`. Then we won't need the `fileLoggerRegistered` flag and we don't need the `cli:beginlogging` event. This chunk of code would just go in a private function.