Merge pull request #2966 from certik/backport2928

BUG: Fix memory leak in ndarray construction from strings (gh-2927)
DOC: document the casting rules changes

This does the work necessary for 1.7.x proposed in issues #561, #2542 and #2685.