mdot: add tests for `ndim==1` for first/last arg.
mdot: document behavior for `ndim==1`.