Sam: implementation of mate_alignment_stop()

* fix off-by-one bug on Sam::alignment_stop (it was reporting the base after the last inclusive base, contradicting the docs)
* refactor cigar operator parsing routine from SamBuilder to Cigar class for mutual use
* add consumes_read_bases and consumes_reference_bases as static methods to the Cigar class
* add tests to the new API and all new functions

This sets the base for issue #6
I feel that we need more tests here, given the number of bugs we've had due to the need to convert from 0-based to 1-based and exclusive to inclusive. Can we add a test for a read of length 1 with cigar 1M, and verify that its alignment stop equals its alignment start?