Allow libqes to buiild on windows

Various changes to allow cross-compilation with mingw.

- use memset not bzero
- use malloc and strncpy not strndup
- use %lu and cast not %zu for size_t
- check for getline and use preprocessor to exclude tests w/ getline if
  we don't have it

Changes to be committed:
      modified:   CMakeLists.txt
      modified:   src/qes_config.h.in
      modified:   src/qes_file.c
      modified:   test/benchmarks.c
      modified:   test/helpers.c
      modified:   test/helpers.h
      modified:   test/test_util.c
Add implementation of strndup for compatiblity

We use CHECK_SYMBOL_EXISTS to check for strndup, and if we don't find
it, we use an implementation that relies on strncpy
Fix typo bug in strndup implementation
remove tests which break AddressSanitizer

Tests of qes_*alloc with SIZET_MAX killed asan
Re-order statements in CMakeLists

Move the includes to where they're needed