Add command to trim the history database.
Mention 'ipython history trim' in whatsnew docs.
Merge pull request #2959 from takluyver/history-trim

Add command to trim the history database.