Feature/optimizedmatrix

Added the Sum optimization - if left or right are Sums, Sum of all of them can be done in one groupBy.
Added the small Product optimization - choosing the joining algorithm based on SizeHints.