ENH: add `multi_dot`: dot with multiple arguments.

`np.linalg.multi_dot` computes the dot product of two or more arrays in
a single function call, while automatically selecting the fastest evaluation
order.

The algorithm for selecting the fastest evaluation order uses dynamic
programming and closely follows:

    Cormen, "Introduction to Algorithms", Chapter 15.2, p. 370-378
Merge pull request #4977 from sotte/mdot

ENH: add `mdot`: fast dot with multiple arguments.