Improve accuracy of scans (lower false negative rate)

Contains a number of improvements ported from my version of the heartbeat.py script; most notably automatic TLS version choosing, improved recv() code, and dynamically generated ClientHello message. This should improve the detection rate (i.e. lower the rate of false negatives).