Add ks_release() to kstring.h

Using this function is a more explicit way of transferring ownership than just "foo = str.s"; the latter leaves room for readers to wonder whether a subsequent "free(str.s)" has been forgotten.

For an example of it in use, see https://github.com/samtools/samtools/blob/develop/bam_sort.c