[FIXES JENKINS-19022] Add option to disable saving build/branch map.

This commit fixes the issues reported in JENKINS-19022.
https://issues.jenkins-ci.org/browse/JENKINS-19022

It introduces an optional configuration flag that will remove all
previous information about which branches were built in Jenkins
before attaching it to the current build as an Action.

If you work with GIT repos with several thousand unmerged branches, this
can easily save several megabytes of both RAM and disk space per build.
With enough builds being run, we're talking about saving GIGAabytes.

The flag is optional and defaults to being disabled, so as to not to
introduce unwanted behaviour changes to existing installations.

The reason for this conservativeness is that it appears possible to us,
that enabling this option *might* break the "merge-before-build"
feature (we do not know enough about that feature to test it).
Other than that, our tests have not shown any issues with this patch.