BUG: fix memoryleaks in datetime dtype parsing

closes gh-4973
closes gh-4974