Fix multiwrite memory leak problem

Fix multiwrite memory leak problem and added some tests into JRamCloud.java