Don't use third-party "what is my IP" services (rebase)

Rebased version of  #3088. I've split the changes into two commits.

Note: this is not ready for merging yet, there are some known problems, see #3088 for discussion

Also: This pull needs to be reorganized so that IsInitialBlockDownload is no longer moved to checkpoints (see @sipa's comments in #3999)
@laanwj As far as I see, you could remove ``RecvLine()`` also.