Fixing more memory leaks in java/class.c