ENH: np.dot: better "matrices not aligned" message

This scratches a long-standing itch of mine, which is that `np.dot`'s "matrices not aligned" message never explains *which* of the two arguments I forgot to transpose somewhere deep inside an algorithm. This patch makes it report the mismatching pair of dimensions.

It might be even prettier to report the full shape of both inputs, but I think this is a big enough improvement for now.
I am pretty sure I moved something like format_shape into common.h a while ago?