Added implementation for r_set_destroy()

Targets #165 .