Assuming no bugs, this pull request should present zero behavior changes.
It presents equivalent transformations that eliminate a needless getblocktemplate dependency.
Fixing this dependency is a blocker for no-wallet mode #2901 which will be rebased on top of this pull.
Tests fine, hopefully quick to review and ACK.