Cache the result of splitEquationIntoChunks.

Speeds up the test program
https://github.com/nasailja/pamhd/blob/master/tests/eigenlab/performance1.cpp
by about 4x.
Fix sign warnings from integer comparisons.
Merge pull request #2 from nasailja/master

Cache the result of splitEquationIntoChunks.