ActivityManager: various improvements
Fix some leaks in framework
Add get and put arraylist method