Generalized the split_set_cookie in split_cookie

This applies to the Cookie header from the request and
to the Set-Cookie header from the response.