Fix IsInitialBlockDownload which was broken by headers first.
Add a locking mechanism to IsInitialBlockDownload to ensure it never goes from false to true.
Win32: log addresses found in Discover() calls
Win32: change buffer size for gethotsname in Discover()

- 256 byte is the maximum, as per
  http://msdn.microsoft.com/en-us/library/windows/desktop/ms738527%28v=vs.85%29.aspx
Merge pull request #5273

cd4d3f1 Win32: change buffer size for gethotsname in Discover() (Philip Kaufmann)
8fa0494 Win32: log addresses found in Discover() calls (Philip Kaufmann)
Merge pull request #5158

9ec75c5 Add a locking mechanism to IsInitialBlockDownload to ensure it never goes from false to true. (Ruben Dario Ponticelli)
a2d0fc6 Fix IsInitialBlockDownload which was broken by headers first. (Ruben Dario Ponticelli)