Cancel the refresh timer in terminate/2.

I think this fixes the issue reported in #29.