Include gmid.h as first header in every file, as it then includes
config.h (that defines _GNU_SOURCE for instance).
Fix also a warning about unsigned vs signed const char pointers in
openssl.
* add -H for explicit servname (for SNI)
* add -v to print also the request
* misc tweaks: move *flag variables to global scope (initialisation to
0 for free!) and explicit handshake.