AJAX scheduler: fix continuous refreshing bug.

Now client JS only sets the last_fetched_index to 0 if it has not been set to anything yet.