BUG: fix some errors raised when minlength is incorrect in np.bincount

I've encountered weird exceptions raised from `np.bincount` when `minlength` is incorrect.  It turns out, `PyArray_PyIntAsIntp` return values were handled incorrectly in that function, this PR is an attempt to fix this.

I'd also argue that `minlength=0` is a valid input, but that would be an API change and hence worth a separate discussion.

## Before
```python
In [1]: np.bincount([1,2,3], minlength="foobar")
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-1-6edd4f5aca9f> in <module>()
----> 1 np.bincount([1,2,3], minlength="foobar")

ValueError: minlength must be positive

In [2]: np.bincount([], minlength="foobar")
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-2-fb3e912f6d10> in <module>()
----> 1 np.bincount([], minlength="foobar")

ValueError: negative dimensions are not allowed

In [3]: np.bincount([], minlength=0)
---------------------------------------------------------------------------
SystemError                               Traceback (most recent call last)
<ipython-input-3-555b8e15ec70> in <module>()
----> 1 np.bincount([], minlength=0)

SystemError: error return without exception set

```

## After

```python

In [1]: np.bincount([1,2,3], minlength="foobar")
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-1-6edd4f5aca9f> in <module>()
----> 1 np.bincount([1,2,3], minlength="foobar")

TypeError: an integer is required

In [2]: np.bincount([], minlength="foobar")
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-2-fb3e912f6d10> in <module>()
----> 1 np.bincount([], minlength="foobar")

TypeError: an integer is required

In [3]: np.bincount([], minlength=0)
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-3-555b8e15ec70> in <module>()
----> 1 np.bincount([], minlength=0)

ValueError: minlength must be positive

```