You've got a pretty good start. You are correct in noticing that there are short and long term values in the code. In order to be able to modify the long term values, we have to either (a) modify the existing code to make these values available outside of the document.ready, or (b) move your new code so that it exists in the document.ready. I think I would prefer to do the latter.
The other tricky part of the code that I would point out is "reachedSum." This is the variable that changes the behavior of the code once the responses have reached the question's total.
So I would remove the "onclick" part of the HTML, and then add this near the end of the document.ready code:
$('#[% QuestionName() %]_' + item).val(0);
$('.slider[data-id="[% QuestionName() %]_' + item + '"]').slider('value', 0);
values[item] = 0;
reachedSum = false;