simplify functions that take an optional cursor
add a clear_takes() method to Participant

also fixes the 4th item of #2630 (was #1920)
remove obsolete reference in comment
zero out giving/receiving/etc amounts in Participant.archive()
add a fake payday implemented in SQL
make get_tip_to and set_tip_to return a dict instead of only the amount
drop the goal_summary view

We don't use it and its definition is obsolete.
compute giving and receiving amounts more accurately

fixes #1127
fix tests
fix condition
rename function
make tests more thorough
failing test for compute_actual_takes()
fix compute_actual_takes()

Tips are processed before takes, the team giving needs to be deducted from the takes budget.
fix typo
failing test for take_over()
fix take_over()
add a `NOT NULL` constraint to the `is_funded` column
check that update_cached_amounts actually updates the amounts
Merge pull request #2718 from gratipay/fix-receiving-amounts

Fix giving and receiving amounts