Add support for watch-only addresses (rebased)

Rebased version of #2861

This is not mergeable in the current state, but people seem to be using this.

Based on a patch by Eric Lombrozo, further work by Pieter Wuille. 

Some compatibility work for interaction with coin control was added by me. This needs to be tested carefully.