Added helper functions to convert from/to bam CIGAR integers.

There are lots of open-coded convertions from and to bam CIGAR integers
throughout the codebase.
Some of them were introduced in commit
18cb19f692dc24ff84fed31e8e35e150e3c55599 Modify cigar format, using 'X' for mismatches,
which are in fact wrong and produce clang warnings like the following:
ssw_cpp.cpp:114:54: error: use of logical '||' with constant operand [-Werror,-Wconstant-logical-operand]
    uint32_t match = ((*length_M << 4) & 0xfffffff0) || (bam_EQUAL_operator & 0x0000000f);

Actually, printing the contents of new_cigar_string alongside new_cigar array in
CalculateNumberMismatch() function gets the following:
new_cigar_string 4=1X4=1I5=
new_cigar        { 0x1, 0x1, 0x1, 0x11, 0x1 }
which is obviously wrong.

After the change the new_cigar_string and new_cigar in the same place
are as follows:
new_cigar_string 4=1X4=1I5=
new_cigar        { 0x47, 0x18, 0x47, 0x11, 0x57 }
which looks correct.