bootstrap: Rework bootstrap to do full ChromeOS checkouts.

In order to safely move between new and old branches, the bootstrap
script needs to do checkouts on the branch before invoking the
branched version of cbuildbot.

This will have the advantage of allowing old branches to use
git-cache, after bootstrap supports git-cache.

This is a nearly full rewrite of the bootstrap script.

BUG=chromium:684907
TEST=Unittests.

Change-Id: I887116ef8b921c19c5f83d728d8d9fc96aa3d4ec
Reviewed-on: https://chromium-review.googlesource.com/443138
Commit-Ready: Don Garrett <dgarrett@chromium.org>
Tested-by: Don Garrett <dgarrett@chromium.org>
Reviewed-by: Don Garrett <dgarrett@chromium.org>
diff --git a/scripts/cbuildbot.py b/scripts/cbuildbot.py
index a77a783..fa18a41 100644
--- a/scripts/cbuildbot.py
+++ b/scripts/cbuildbot.py
@@ -378,6 +378,12 @@
     return self.add_option(*args, remote_pass_through=True, **kwargs)
 
 
+def CreateParser():
+  """Expose _CreateParser publicly."""
+  # Name _CreateParser is needed for commandline library.
+  return _CreateParser()
+
+
 def _CreateParser():
   """Generate and return the parser with all the options."""
   # Parse options