Adds mean(A, v) where v is a vector of dimensions.

Also modifies `mean(A, d)` for scalar d to squeeze the result along the dimension
of the mean. Or in other words, mean of N-dim A has N-1 dims.

This latter change breaks conformity with MATLAB, but I cannot think of a use case where I would expect `mean(v, d)` to preserve the dimension of `v`, except for the case where I want to take a mean along several axes. But, by extending mean to accept a vector of dimensions, this other use case goes away.