strip trailing whitespaces
Makefile tweaks

added compilation of example.c.
treat compilation warnings as errors.
ssw_test depends on kseq.h too.
Added compilation of C++ version and example.
Fixed compilation warnings in ssw_cpp.cpp

ssw_cpp.cpp: In function ‘int {anonymous}::CalculateNumberMismatch(StripedSmithWaterman::Alignment*, const int8_t*, const int8_t*)’:
ssw_cpp.cpp:156:15: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
ssw_cpp.cpp:183:22: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
ssw_cpp.cpp:189:22: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
Output soft clipping for new cigar format too.

The new cigar format was introduced in
18cb19f692dc24ff84fed31e8e35e150e3c55599.
It distinguishes between a match ('=') and a mismatch('X') instead
of simply outputting 'M'.
But it lacked output of soft clipping.
Fix this by coping a part of ConvertAlignment() into
CalculateNumberMismatch().

Example cigar strings:
old (before 18cb):             9S13M1S
new (after 18cb):              1X1=1X3=1X1=1X2=2X
new fixed (after this change): 9S1X1=1X3=1X1=1X2=2X1S

old (before 18cb):             122S14M36S
new (after 18cb):              3=1X2=1X2=3X1=1X
new fixed (after this change): 122S3=1X2=1X2=3X1=1X36S
Fixed memory leaks in example.c

Reported by valrgind as
12 bytes in 1 blocks are indirectly lost in loss record 1 of 5
    at 0x4C2A1C0: malloc (in vgpreload_memcheck-amd64-linux.so)
    by 0x403ACA: ssw_align (ssw.c:708)
    by 0x400980: main (example.c:146)

52 (40 direct, 12 indirect) bytes in 1 blocks are definitely lost in loss record 2 of 5
    at 0x4C28070: calloc (in vgpreload_memcheck-amd64-linux.so)
    by 0x402554: ssw_align (ssw.c:785)
    by 0x400980: main (example.c:146)

80 bytes in 1 blocks are indirectly lost in loss record 1 of 3
    at 0x4C2A1C0: malloc (in vgpreload_memcheck-amd64-linux.so)
    by 0x401CFF: ssw_init (ssw.c:99)
    by 0x40091F: main (example.c:142)

160 bytes in 1 blocks are indirectly lost in loss record 2 of 3
    at 0x4C2A1C0: malloc (in vgpreload_memcheck-amd64-linux.so)
    by 0x402291: ssw_init (ssw.c:353)
    by 0x40091F: main (example.c:142)

288 (48 direct, 240 indirect) bytes in 1 blocks are definitely lost in loss record 3 of 3
    at 0x4C28070: calloc (in vgpreload_memcheck-amd64-linux.so)
    by 0x401B00: ssw_init (ssw.c:742)
    by 0x40091F: main (example.c:142)
Fixed memory leaks in ssw_cpp in case of non-default translation matrix.

The leak was reported by valgrind as:
128 bytes in 1 blocks are definitely lost in loss record 1 of 1
   at 0x4C294E0: operator new[](unsigned long) (in vgpreload_memcheck-amd64-linux.so)
   by 0x404CD8: StripedSmithWaterman::Aligner::Aligner(signed char const*, int const&, signed char const*, int const&) (ssw_cpp.cpp:288)

Also fixed a leak in Rebuild().

Got rid of matrix_built_ -- check translation_matrix_ pointer for NULL
instead.
Got rid of default_matrix_ too as the actual logic using it was wrong --
instead always perform a full copy of the translation matrix (even in
case of default one).
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.
More consts.
Fixed memory leaks on error paths and other clang warnings.

Fixed the following scan-build warnings:
ssw.c:188:11: warning: Value stored to 'e' during its initialization is never read
                __m128i e = vZero, vF = vZero, vMaxColumn = vZero; /* Initialize F value to 0.
                        ^   ~~~~~
ssw.c:425:11: warning: Value stored to 'e' during its initialization is never read
                __m128i e = vZero, vF = vZero; /* Initialize F value to 0.
                        ^   ~~~~~
ssw.c:673:5: warning: Potential leak of memory pointed to by 'c'
                                fprintf(stderr, "Trace back error: %d.\n", direction_line[temp1 - 1]);
                                ^~~~~~~
ssw.c:673:5: warning: Potential leak of memory pointed to by 'direction_line'
                                fprintf(stderr, "Trace back error: %d.\n", direction_line[temp1 - 1]);
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ssw.c:673:5: warning: Potential leak of memory pointed to by 'e_b'
                                fprintf(stderr, "Trace back error: %d.\n", direction_line[temp1 - 1]);
                                ^~~~~~~
ssw.c:673:5: warning: Potential leak of memory pointed to by 'h_b'
                                fprintf(stderr, "Trace back error: %d.\n", direction_line[temp1 - 1]);
                                ^~~~~~~
ssw.c:673:5: warning: Potential leak of memory pointed to by 'h_c'
                                fprintf(stderr, "Trace back error: %d.\n", direction_line[temp1 - 1]);
                                ^~~~~~~
ssw.c:673:5: warning: Potential leak of memory pointed to by 'result'
                                fprintf(stderr, "Trace back error: %d.\n", direction_line[temp1 - 1]);
                                ^~~~~~~
ssw.c:810:3: warning: Potential leak of memory pointed to by 'r'
                fprintf(stderr, "Please call the function ssw_init before ssw_align.\n");
                ^~~~~~~
ssw_cpp.cpp:355:8: warning: Memory allocated by 'new[]' should be deallocated by 'delete[]', not 'delete'
  else delete translated_query;
       ^~~~~~~~~~~~~~~~~~~~~~~
ssw_cpp.cpp:399:8: warning: Memory allocated by 'new[]' should be deallocated by 'delete[]', not 'delete'
  else delete translated_query;
       ^~~~~~~~~~~~~~~~~~~~~~~
Do not treat compilation warnings as errors.

This mostly reverts commit 285a3e4fbbe8c750418c12c254de5168c010e569.
Mengyao noted that -Werror can result in unexpected compilation errors
for end-users, which may prevent them from using the library [1].

[1] https://github.com/mengyao/Complete-Striped-Smith-Waterman-Library/pull/6#issuecomment-44559156
Merge pull request #6 from ahippo/master

Added compilation of examples and of the C++ version; output soft clipping in cigars; fixed cigar generation in C++ version; fixed memory leaks; fixed compilation warnings.