BUG: Fix variable declaration after statement.

Some declarations that are not at the beginning of a block have slipped
into the code. This breaks compilation on Python3.4a1. The Numpy coding
standard also disallows that construct.

Closes #3598.
ENH: add quickselect algorithm and expose it via partition

A partition sorts the kth element into its sorted order and moves all
smaller elements before the kth element and all equal or greater
elements behind it.
The ordering of all elements in the partitions is undefined.

It is implemented via the introselection algorithm which has worst case
linear complexity compared to a full sort that has linearithmic
complexity.
The introselect algorithm uses a quickselect with median of three pivot
and falls back to a quickselect with median of median of five pivot if
no sufficient progress is made.

The pivots used during the search for the wanted kth element can
optionally be stored and reused for further partitionings of the array.
This is used by the python interface if an array of kth is provided to
the partitions function. This improves the performance of median and
which need to select two elements if the size of the array is even. A
percentile function interpolating between values also profits from this.

String selection is implemented in terms of quicksort which has the same
properties as a selection for now.
ENH: implement median in terms of partition

Partitioning is sufficient to obtain the median and is much faster.
In the case of overwrite_input=True the resulting array will not be
fully sorted anymore.
Merge pull request #3600 from charris/fix-iso-c90-breakage

BUG: Fix variable declaration after statement.
Merge pull request #3360 from juliantaylor/selection-algo

 add quickselect algorithm and expose it via partition
BUG: Fix typo in core bento file.
DOC: Fix small typos in partition docstring.
Merge pull request #3606 from stefanv/selection_bento_fix

BUG: Fix typo in core bento file.
Merge pull request #3607 from stefanv/select_doc_typos

DOC: Fix small typos in partition docstring.
TST: Test for x.fill(tuple) where x is a struct array
BUG: Fix to allow x.fill(tuple) where x is a struct array
BLD: Fix build on MSVC (no uint64_t, use npy_uint64)
Merge pull request #3609 from mwiebe/fill_struct_from_tuple

Bugfix: Regression when filling struct from tuple
TST: Add test for reduceat ufunc regression on zero-sized array
BUG: Fix ufunc.reduceat regression with empty index (gh-2892)
TST: Change reduceat empty test to use i4 indices

On 32-bit platforms, was failing in casting the test
i8 index to i4. It may be desirable to allow this
in reduceat, but that change is independent of this pull
request.
TST: Add test for additional ufunc.reduceat empty parameter case
BUG: Fix additional zero-sized index case for ufunc.reduceat
Merge pull request #2893 from mwiebe/reduceat_empty

Reduceat regression fix