add memory testing framework and add some sdsfree fixing memory leak