BUG: fix issue with distutils.exec_command introduced in 1.7.0.

Closes gh-2999 and gh-2915.

There are several packages (nose, scipy.weave.inline, Sage inline Fortran) that
replace stdout, in which case it doesn't have a fileno method.  This method was
attempted to be used (change in gh-2766 to fix a py3k issue).
FIX: add _supports_fileno() for testing fileno()

The new _supports_fileno() function works in all versions of Python.
The problem was that in Python 2.x, the fileno() method of StringIO() is
missing, while in Python 3.x, it is present, but raises an exception.
PEP8: don't use \
TST: add robust tests for exec_command()

First, we test both stdout and stderr.

Second, we now test both _exec_command_posix() and _exec_command(), see
numpy/distutils/exec_command.py. This reveals a bug in the implementation which
will be fixed in the next commit. For now the failing test is commented out so
that all tests still pass.
Implement separate checking for stdout and stderr

And enable a test for this that was failing before.
TST: Redirect the other stream to temp. file

Now things behave the same if executed with either of:

nosetests
nosetests -s
TST: skip general test on non-posix platforms

Add a comment explaining the issue.
Merge pull request #3128 from certik/pull-request-3127

BUG: fix issue with distutils.exec_command introduced in 1.7.0.
TST: open the TemporaryFile in ASCII mode

This should fix gh-3165.

Conflicts:
	numpy/distutils/tests/test_exec_command.py
Merge pull request #3167 from certik/forwardport3165

TST: open the TemporaryFile in ASCII mode
Proof-of-concept for ufunc fancy indexing

Conflicts:

	numpy/core/code_generators/numpy_api.py
Add support for both unary and binary ufuncs
Add comments
Change 'select' method name to 'at'
Add unit tests

Conflicts:

	numpy/core/tests/test_ufunc.py
Check for sucessful call to MapIterBind
Misc fixes

- Fix crash when bind for second map iter fails
- Accept array like object for second operand
- Fix memory leaks
Rework 'at' method to fit customer's expectations.

'at' method should be functionally equivalent to op1[idx] += op2 (for add ufunc).
Update/expand unit tests
Update documentation for 'at' method