Introduce an option to not trap process exits in worker processes (#171)

When worker processes are part of an external connection pool it may make sense
to rely on automatic cleanup based on links. Since by default worker processes
trap exits, linked proceses would fail to terminate the ibrowse worker and
instead it would generate an '{'EXIT', Pid, Reason}' which is handled in
handle_info/2 with a warning to stdout.

Add a new option to allow users to control worker process link behavior via an
ibrowse config parameter. The default stays the same (=true).
diff --git a/src/ibrowse_http_client.erl b/src/ibrowse_http_client.erl
index e59228c..5443fe7 100644
--- a/src/ibrowse_http_client.erl
+++ b/src/ibrowse_http_client.erl
@@ -133,7 +133,7 @@
 %%          {stop, Reason}
 %%--------------------------------------------------------------------
 init({Lb_Tid, #url{host = Host, port = Port}, {SSLOptions, Is_ssl}}) ->
-    process_flag(trap_exit, true),
+    maybe_trap_exits(),
     State = #state{host = Host,
                    port = Port,
                    ssl_options = SSLOptions,
@@ -143,7 +143,7 @@
     put(my_trace_flag, ibrowse_lib:get_trace_status(Host, Port)),
     {ok, set_inac_timer(State)};
 init(Url) when is_list(Url) ->
-    process_flag(trap_exit, true),
+    maybe_trap_exits(),
     case catch ibrowse_lib:parse_url(Url) of
         #url{protocol = Protocol} = Url_rec ->
             init({undefined, Url_rec, {[], Protocol == https}});
@@ -151,7 +151,7 @@
             {error, invalid_url}
     end;
 init({Host, Port}) ->
-    process_flag(trap_exit, true),
+    maybe_trap_exits(),
     State = #state{host = Host,
                    port = Port},
     put(ibrowse_trace_token, [Host, $:, integer_to_list(Port)]),
@@ -2187,3 +2187,9 @@
 
 delayed_stop_timer() ->
     erlang:send_after(500, self(), delayed_stop).
+
+maybe_trap_exits() ->
+    case ibrowse:get_config_value(worker_trap_exits, true) of
+        true -> process_flag(trap_exit, true);
+        false -> ok
+    end.