r406: allow to use diff clipping penalties

for 5'-end or for 3'-end
Merge branch 'master' into clip2
alternative way to estimate mapQ

the old mapQ estimate is too conservative
slight modification
use the old mapQ by default

the new mapQ overestimate
more conservative mapQ
r413: fixed an issue causing redundant alignment

I have seen a fosmid aligned to the same position but with two slightly
different CIGARs: 30000M and 29900M50D100M, possibly caused by tandem repeats.
0.7.5a will regard them as two distinct alignments and generates a very small
mapping quality. However, these two are essentially the same. Although there is
ambiguity in aligning the end of the fosmid, we should not penalize the entire
alignment with a small mapQ. This commit fixes this issue. More testing is
needed, though.
r414: fixed a bug caused by the last commit
r415: bug in the new (optional) mapQ computation

I may use the new method as the default. Testing needed.
r416: removed a line of debugging code
use kthread for multi-threading

Bwa-mem should have better performance with many CPU cores.
r418: use the new mapQ estimator by default
r419: print the @PG line
r420: inferred bandwidth is not used in the final
r421: bw doubling in the final alignment

In some cases, the band width used in the final alignment needs to be larger
than the band width in extension.
r422: matesw hits not sorted
r423: bugfix - SE hits not random
r424: fixed a bw bug in samse/pe
r427: fixed bugs in backtrack

See comments in ksw_global() for details.
print debugging msg to stdout