ctx_infer_edges.c: parse own command line args
Use new struct MemArgs for -m, -n options [skip CI]

cmd.c:
- added struct MemArgs to store --memory <M> --nkmers <N> values
  - added associated methods cmd_mem_args_set_memory(), cmd_mem_args_set_nkmers()
- cmd_get_longopt_str(), cmd_long_opts_to_short() take buffer length argument
  for safety, and call string_buffer.c:string_safe_ncpy().

scripts/make-circos.pl
- print colour key with circos generation
Split out code from ctx_correct.c -> src/tools/correct_reads.{c,h}
Merge manual argument parsing in ctx_thread.c and ctx_correct.c

read_thread_cmd.c:
- move ctx_thread.c and ctx_correct.c command line parsing to new file
- inputs are mostly the same for the two commands
- new struct bundles command line arguments for both commands together
- passing struct options for getopt allows turning arguments on/off

ctx_correct.c:
- parse own command line arguments using getopt_long()
- only permit loading a single graph file

ctx_thread.c:
- move arg parsing into read_thread_cmd.c

correct_read_input.c -> correct_aln_input.c
- rename since used in ctx_thread and ctx_correct

seq_output.c:
- create new struct + methods for writing se/pe FASTA files
- used in correct_reads.c
- used to be called CorrectedOutput

async_io_reader.c:
- return <out> path argument from e.g. --seq <in>:<out>

libs/Makefile:
- don't try to clean directories that aren't there
Fix GCC error
ctx_build.c: uses getopt for cmd line args

ctx_build.c:
- now handles its own command line arguments with getopt

ctx_correct.c:
- add -c,--colour <C> option to specify which colour to correct against

Renaming files:
- graph_file_filter.c -> graph_file_reader.c
- path_file_filter.c -> path_file_reader.c

Renaming structs:
- AsyncIOReadTask -> AsyncIOReadInput
TIL: free accepts NULL

db_graph_dealloc(): free fields inside dBGraph
ctx_coverage.c handle args; Added test Makefile
ctx_rmsubstr updated command line args
ctx_breakpoints.c: handles command line args manually

ctx_breakpoints.c:
- handle command line args manually

src/kmer/cmd.h:
- add cmd_line_given variable to store command line string
- add cmd_cwd variable to store current working directory

src/kmer/caller_output.c:
- new file for common output from bubble caller + breakpoint caller
Fix bug in acquiring locks in clean_graph.c
Fix test/thread_pe/Makefile option
Split out global.h code; Added supernode_iterate();

1. Split out ctx_alloc, ctx_assert, ctx_output
src/basic/ctx_alloc.c: wrappers for malloc, calloc etc
src/basic/ctx_assert.c: wrappers for assert and family
src/basic/ctx_output.c: status output functions

2. Added supernodes_interate() function to supernodes.h
- used in clean_graph.c: cleaning_get_threshold() and clean_graph()
- used in supernodes.c: supernode_write_len_distrib()

3. Fixed bugs in parsing arguments in ctx_thread

Bugs caught by Kiran (@kvg)
Moved cmd.c -> src/basic/cmd.c; Split out src/kmer/cmd_mem.c

1. split cmd_mem.c (out of cmd.c) to handle memory calculations
2. moved src/kmer/cmd.c -> src/basic/cmd.c
3. added cmd_get_cmdline(), cmd_get_cwd() to cmd.h
4. clean_graph.c: print number of nodes removed by tips/supernodes/both
Report number of kmers dumped when calling graph_write_all_kmers()
Re-write alloc wrapper checks; ctx_bubbles.c handles own args
ctx_pview use getopt_long()
Updated ctx_view to use getopt_long(), changes flags
Better stats output from ctx_clean.c + uses getopt_long()

ctx_clean.c:
- handles arguments manually with getopt_long()
- changed some command line arguments
- add number of kmers to coverage histogram
- options to save before/after covg/len histograms

scripts/plot-covg-hist.R:
- updated to include a plot of kmer count

clean_graph.c:
- Record before/after covg/len histograms as we go

supernode.c:
- don't need separate method here to get supernode length distribution

graph_reader.c:
- safer / cleaner parsing of threshold values in header

graph_info.c: Fixed not setting supernode threshold correctly
Update path joining command pjoin

ctx_pjoin.c:
- use manual getopt_long()

test/pjoin/Makefile:
- simple test for pjoin

path_store.c:
- fix bug in path_store_add_packed(), breaking merging path files with pjoin

ctx_join.c:
- maximise use_ncols if memory allows