Good question!
I wouldn't say Gollum fulfilled those criteria. In fact I think his reappearance at Mount Doom is integral to the whole story; he completes what Frodo was unable to complete and this situation leaves the reader with many questions to ask, ideas to consider. I also think that Gollum's end was one of the most perfect endings to any character in literature; it is not merely convenient that he did what he did, but entirely right. He disappears and then turns up right at the last moment, driven by the Ring, thus showing how far the bearers will go to keep possession of it. I also cannot see how Gollum could have gone on without the Ring, and in doing what he did, he seems to have also gained some kind of redemption.
Yes, it's a big shock, but it fits the logical pattern of the story perfectly. In the end, at Mount Doom, the culmination of all this effort, there are no heroes.
Now those Eagles, they are a different matter...