don't use cursors in threaded code, they're not thread-safe
fix traceback hack in `threaded_map()`
fix test
inline `mark_charge_failed()`
Merge pull request #3007 from gratipay/fix-payday-threading

Fix payday threading
fix JS sign-out (closes #2991)