Multiple fixes:

(1) Fixed an edge-case in the linear-space aligner, in which fillBackward
failed to correctly set the terminal gap costs, because of the used of
the wrong test condition (lengthB should've been LengthA).

(2) Fixed unrelated bugs that also affected terminal gaps in the
quadratic-space aligner: (a) terminal costs weren't being correctly passed
in to the aligner, and (b) and the values for the first row and column of
the DP table were not correctly scoring impossible cells.