[Background Fetch] Add a FinishWithError abstract method for DatabaseTask.

This method is meant to standardize how each database task executes its callback,
and terminates the DatabaseTask. Most DatabaseTasks have an ad hoc way of doing
this anyway.

This also has the extra benefit of making reporting failures via UMA easier, since
there will be one place to report from, rather than having it scattered all over
the file.

Also remove GetNumRequestsTask since it is not used anymore.

TBR=avi@chromium.org

Bug: 780025
Change-Id: I1d8793fd9a25ef52f19737958a65e0b0e774bde0
Reviewed-on: https://chromium-review.googlesource.com/1128079
Commit-Queue: Rayan Kanso <rayankans@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Peter Beverloo <peter@chromium.org>
Cr-Commit-Position: refs/heads/master@{#575651}
27 files changed