Inmates surrender in NSW prison riot