TS-1761 Improve scheduling and configuration around HostDB sync
TS-1820 New warnings introduced with premature commit
TS-1721 fix build with platforms that needs -lpthread
TS-1717 Fix the large number, so that it builds on some platforms.