Phlogiston/Forecasting Model

For all calculations, "now" or "today" is the most recent day in the data.
 * 1) Calculate velocity per category
 * 2) Subtract total number of resolved tasks 1 week prior from total number of resolved tasks today.
 * 3) Make three forecasts of velocity
 * 4) Optimistic is the highest 3 weeks in the last 3 months, with a minimum of 2
 * 5) Nominal is the average per week over the last 3 weeks, with a minimum of 1
 * 6) Pessimistic is the worst 3 weeks in last 3 months, with a minimum of zero.
 * 7) Note: For teams that resolve tasks every 2 weeks, and thus have a bunch of 0 weeks, this will produce a falsely low forecast
 * 8) Count all negative weeks as zero before averaging or summing.
 * 9) Make three forecasts of backlog growth (total, not remaining) (As of 17 Mar 2016, work in progress not yet implemented in production).
 * 10) Optimistic is flat, 0 growth.
 * 11) Nominal is the average of the last three weeks.
 * 12) Pessimistic is the greater of
 * 13) the average backlog growth of the last three weeks
 * 14) the average over the last three months.
 * 15) Count all negative weeks as zero before averaging or summing.
 * 16) Combine Velocity and backlog growth forecasts
 * 17) Optimistic is not changed
 * 18) Updated nominal velocity is nominal velocity - nominal backlog growth (not less than 0).
 * 19) Updated pessimistic velocity = pessimistic velocity - pessimistic backlog growth (not less than 0).
 * 20) Divide the total points remaining (per category) by each of the three velocities to determine # of weeks remaining