BUG|API: Raise wrong arg{min|max} out shape and stricter check

The error was not raised when the output array size did not match
the given out array causing segfaults if the out array was smaller.

This also makes the shape check strict and changes the error
to a ValueError. The shape check could be relaxed for leading
ones. ufuncs and assignments do this.