BundleWriter: Support including HEAD in bundle

Bug: 446813
Change-Id: Ide64aec2a995dd7ff6c1325c3ada242a4eb4565e
Signed-off-by: Robin Stocker <robin@nibor.org>