AddEngagementBudget and SpendBudget added to BudgetDatabase.

The BudgetDatabase already had a basic AddBudget method which would add a fixed
amount of budget. This CL adds an engagement based budget increment which takes the
SES score and adds a percentage of the score to the budget based on when the last
award grant was added. For instance, if the budget was last added a day ago, then
AddEngagementBudget will add 1/3 of the SES score to the budget. This functionality
required adding another parameter to the database, which is the last time the
budget was incremented with engagement-based budget.

This CL also adds SpendBudget, which will reduce the budget by the amount requested
if it is available, and will invoke the callback with false otherwise.

BUG=617971

Review-Url: https://codereview.chromium.org/2255813002
Cr-Commit-Position: refs/heads/master@{#413995}
4 files changed