Fix mapslice on functions that return scalars.

"Alternate" implementations of the stats functions now work. For example:
```
a = reshape(1:24, 4, 3, 2)
mapslices(mean, a, 3)
```