Bt array caching

Added haplotype caching to the arrays implementation. Necessitated some changes to the way fill bounds are calculated. Passes the smallTest.

For Mauricio to please review.