Hamas, Fatah near agreement on who will oversee postwar Gaza