At least 21 Palestinians, including eight children, who were sheltering in a bombed-out apartment building in Gaza have been killed after the structure collapsed overnight.