Ex-Israeli army chief says any Gaza deal failing to dismantle Hamas would be ‘complete failure’