BUG: Fix reference leak in PyArray_IntpFromIndexSequence.

This caused {ones, zeros, empty}([1]*10) to increase the reference
count of 1 by 10. Same for other numbers in the list.

Closes #3589.
TST: Add test for reference leak in zeros, ones, empty, and full.

Check that the reference counts of the  passed dimensions do not
change.
Merge pull request #3631 from charris/fix-reference-leak

Fix reference leak