refcounter.py: prevent use of excessive RAM with large refs logs
When processing a 212MB refs file, refcounter.py used over 3GB of RAM.
This change greatly reduces memory usage in two ways:
* Saving object history in whole lines instead of separated values.
* Not saving normal/skewed/leaked object lists unless they are requested.
ASTERISK-23921 #close
Reported by: Corey Farrell
Review: https://reviewboard.asterisk.org/r/3668/
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@417480
65c4cc65-6c06-0410-ace0-
fbb531ad65f3