Fix memory leaks, crash bugs, atrocious formatting.

_cmap.so:burnHeatMap now returns 0 on success or any other value on failure.
Fun bug: getbit() and setbit() had (x*xMax + y) instead of (y*xMax + x), which
         leads to segfaults but only with non-square input matrices.
More fun: I'm not sure whether _cmap.c is capable of overflowing an int anywhere.