Added matrix sequence code and tests. It allows to work transparently on
a sequence of matrix and on the corresponding flatten array.