Various memory related cleanups
Merge branch 'master' of github.com:anchor/libanchor_stats