FIX: core: remove sprintf calls

This changes the behavior of ufunc_repr to no longer truncate its arg's
name. I guess the truncation was only there to make the function work
with sprintf, and if I read http://bugs.python.org/issue7330 correctly,
then truncation wouldn't work in 3.2 <= Python <= 3.4.
MAINT: core: simplify array_repr_builtin (don't use sprintf)
FIX: core: unchecked realloc

Also changed types to Py_ssize_t, and check for overflow when multiplying.
Merge pull request #5124 from larsmans/c-fixes

FIX: core: remove sprintf calls