This change allows ufunc operand flags to be set in addition to the
default operand flags set by the nditer object. For example, after
calling PyUFunc_FromFuncAndData() to create a ufunc object, the first
operand can be set to be read/write like so:

ufunc->op_flags[0] = NPY_ITER_READWRITE

Setting flags for output operands is not supported at this time and
will raise an exception.

This change also allows the global nditer flags to be set, so after
setting the read/write flag, the reduce ok flag could be set like so:

ufunc->iter_flags = NPY_ITER_REDUCE_OK
minor fixes for previous ufunc operand flag change
initialize ufunc op_flags pointer in frompyfunc()
correctly initialize op_flags and iter_flags in frompyfunc()
Remove guard against read+write output operands
Update c api documentation
Add test for setting operand flags through c api
Fix python 2/3 issues in operand_flag_tests module
Fix formatting issues
BUG: Fix 0-d array special case from reductions.

This channels scalars through the usual reduction machinery and
modifies it slightly to correctly support scalar reductions of
identity-less ufuncs.
Whitespace changes
Add null check after allocating op_flags
Remove unneeded blank line
Merge pull request #359 from jayvius/operand-flags

Allow ufunc operand flags to be set
MAINT: Remove unnecessary 0-d special case.

This special case was made unnecessary by changes to the nditer.
Merge pull request #3323 from ContinuumIO/broadcast_arrays_fix

Broadcast arrays fix
Merge pull request #3325 from seberg/remove-gh-356-special-case

MAINT: Remove unnecessary 0-d special case.
Merge pull request #3316 from seberg/issue-3314

BUG: Fix 0-d array special case from reductions.
Add support for structured array ufuncs

- Add New api method PyUFunc_RegisterLoopForStructType for creating new ufunc for structured array
- Add arg_dtypes array to PyUFunc_Loop1d object. This keeps track of each struct dtype that the ufunc can handle.
- Add arg_dtypes parameter to ufunc_loop_matches function so that struct dtypes can be compared for NPY_VOID type num
Add comments for new RegisterLoopForStructType API method