Moved util.genmatrix() into matrix.ItemItemMatrix

more complex code deserves its own submodule