Improving reproducibility of discharge for shock wave generator-using medium between opposing electrodes of capacitance with resistance close to critical resistance value