BUG: fix scalar type memory leak

have an explicit tp_free that is different from PyObject_Free which is also the
tp_free of PyBaseObject so python does not COPYSLOT it, instead it takes the
next parent PyInt which has a different allocator.
Also added it for arrays just in case, currently not required as they don't
don't inherit from a python type.
Merge pull request #4248 from juliantaylor/scalar-memleak

BUG: fix scalar type memory leak