cleaned-up loop indexes in Tensor.cxx
Added tests for 4D tensors. Now using a consistant cubes,slices,rows,columns index order everywhere.