[electrum] fix sweep and add a test
Summary: D14436 broke the sweep function. Fix it, document it, and add a test to avoid future regressions.
Test Plan: python test_runner.py
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D14442