Public organisations across Wales have pledged a new approach centred on survivors and the bereaved of public tragedies.