Run unit-test code as env.UnitTest

Enable memory check for agent unit-tests
Fix unit-test memory leak errors
Move failing tests to flaky_test_list

Change-Id: Ifa8a4b17f6d672a13604277265337006ea64fe82