added bad_alloc and exception tests for copy_if