core.dot_mm(): optimization for C-contig and F-contig matrices

Yay, speed gains! (although not dramatic)