Reduce query count/time in DashboardHelper
Reduce query count/time in DashboardHelper

Before this change, these three methods each looped through records
to total up their line items:

  * `#total_received_donations`
  * `#total_purchased`
  * `#total_distributed`

This resulted in a number of queries that grew linearly with the
number of corresponding records.

This commit reduces each method to a single query by summing the
quantities through LineItem directly. It also re-uses the method
for doing so in `#received_distributed_data`, where previously the
code was copied and pasted (and subtly different). In my development
environment, this cut 50-100ms off the request time for
/pdx_bank/dashboard.

rubyforgood/diaper,rubyforgood/diaper,rubyforgood/diaper,rubyforgood/diaper