Fix several issues from clang's scan-build

  * src/qes_file.h: Small, very rare bugs created if realloc failed.
  * test/test.c: Fix broken CLI parsing bug.
  * test/test_seqfile.c: Fix possible double free on test failure.
Merge branch 'fix/scanbuild-issues' into next

Fix several issues scan-build found