add virtual destructor for linear_list and destructor for list, fixes #10