Implement and test remove_copy and remove_copy_if