As M23 rebels entered Goma and the city was plunged into chaos, female prisoners were attacked, the UN says.