Fix a highly unlikely but still possible memory leak.
Implement memory pool debugging and statistics.
Add stats command; currently only /stats mempool object can be used.