refactor layout tests

add tests for matrix index offset FAILING
remove intra- comparisons (matrix.fetchIndex, etc.) for now as they dont work
reimpl matrix (matrix.js)
- add test/matrix tests
- fix test/vis and test/layout to work with new implementation

change crosstab().data(data).layout() -> crosstab().layout().data(data)

add crosstab.layout.sortDims() for typical sort cases

add test/layout inter-group comparator tests for 2x2 tables

add test/layout intra-group comparator tests for 1x1 tables

fix tests to get rid of globals

Note: squashed commit
version bump

remove apily/sha1 dep (not needed)