Add Installer.AttemptsCount.Total metric.

This patch adds a new Installer.AttemptsCount.Total metric that
reports the number of payload attempts until the payload is
successfully applied. To achieve this a new variable persisted in
the preferences directory is added. This variable tracks the number
of attempts for the current payload, beign it a full or a delta
payload.

Unfortunatelly, there is a "PayloadAttemptNumber" variable that
tracks the number of attempts for the current payload, but only
if it is a Full payload since this value is used for the exponential
backoff algorithm used only for Full payloads. To overcome this,
this variable is renamed to "FullPayloadAttemptNumber" and the
new variable, tracking both delta and full payloads, is named
"PayloadAttemptNumber". The setter, getter and unittests are
updated as needed, and a new test is introduced to verify the
difference between these two variables when the involved payload
is a Delta payload.

BUG=chromium:226769
TEST=update_engine_unittests

Change-Id: I33d346d27ee8355f1152ebb829621571fe3a4244
Reviewed-on: https://gerrit.chromium.org/gerrit/60951
Reviewed-by: Alex Deymo <deymo@chromium.org>
Tested-by: Alex Deymo <deymo@chromium.org>
Commit-Queue: Alex Deymo <deymo@chromium.org>
diff --git a/constants.cc b/constants.cc
index 7f14ddb..a85eb26 100644
--- a/constants.cc
+++ b/constants.cc
@@ -32,6 +32,7 @@
 const char kPrefsCurrentUrlFailureCount[] = "current-url-failure-count";
 const char kPrefsCurrentUrlIndex[] = "current-url-index";
 const char kPrefsDeltaUpdateFailures[] = "delta-update-failures";
+const char kPrefsFullPayloadAttemptNumber[] = "full-payload-attempt-number";
 const char kPrefsLastActivePingDay[] = "last-active-ping-day";
 const char kPrefsLastRollCallPingDay[] = "last-roll-call-ping-day";
 const char kPrefsManifestMetadataSize[] = "manifest-metadata-size";