BUG: Error checks for the dtype shape.

Also creates a clean tuple for the shape tuple, instead of
passing potentially mutable objects through.

Closes gh-4009
BUG: fix minor memory leak in memoryview failure case
TST: add travis test using python-dbg

python-dbg adds couple extra asserts on reference counts, memory
allocation and also enables a few numpy internal asserts.
Merge pull request #4197 from juliantaylor/memview-leak

BUG: fix minor memory leak in memoryview failure case
Merge pull request #4205 from juliantaylor/travis-dbg

TST: add travis test using python-dbg
BUG: fix build with single-threaded python

Some symbols are not defined leading to:
ImportError Undefined symbol: PyGILState_Release

Closes gh-3255
Merge pull request #4206 from juliantaylor/single-thread-fix

BUG: fix build with single-threaded python
BUG: set the needs_api variable in np.where
Merge pull request #4207 from juliantaylor/where-api

BUG: set the needs_api variable in np.where
BUG: testing.run_module_suite() didn't pass on KnownFailure.

This results in errors whenever you run tests using KnownFailure
like so: ``python test_mymodule.py`` (where run_module_suite is
used in the file, like numpy and scipy do).
Merge pull request #4211 from rgommers/fix-knownfail

BUG: testing.run_module_suite() didn't pass on KnownFailure plugin.
MAINT: remove unused simple_capsule_dtor() from npy_3kcompat.h

This removes a lot of build warnings when including this file.
MAINT: remove unused variables from einsum.c.src and loops.c.src

Fixes some build warnings.
MAINT: fix build warnings for umath_linalg

The removal of CFLOAT for eig/eigvals is related to a bug, see c355550dd80.
Can be put back once that issue is fixed.
MAINT: fix build warnings in test_rational.c.src
MAINT: silence some build warnings due to missing NO_IMPORT_ARRAY
ENH: reduce overhead of probs check of choice

Use kahan_sum as multinomial does.
Closes gh-4188
MAINT: regenerate with cython 0.20 and fix a warning it emits

Fixed warning is "Non-trivial type declarators in shared declaration".
Merge pull request #4212 from rgommers/buildwarnings

Fix some build warnings
BUG: properly handle references of objects in new np.where

Objects must go over the objects copyswap function and GIL must be taken
before dereferences for correct reference counting.