Cleanup split memleaks

Clean up a couple of memory leaks in samtools split relating to strings,
state and opts.

Signed-off-by: Martin O. Pollard <mp15@sanger.ac.uk>