Update ArrayList.h

Bug fixed, memory leak fixed, Pass all Test