Revert "Fixed TreeBuilder.write's missing repo argument to match its documentation."

This reverts commit f3673dec664e07db19b4395b043ab69289047a56.
Added Repo.prototype.treeBuilder