Avoid creating an unneeded ra-session per 'svn checkout' and per update of
directory external by passing an optional ra session to a few more internal
libsvn_client functions.

* subversion/libsvn_client/checkout.c
  (svn_client__checkout_internal): Move output arguments to front. Accept
    optional existing ra session. Pass ra session to
    svn_client__update_internal.
  (svn_client_checkout3): Update caller.

* subversion/libsvn_client/client.h
  (svn_client__update_internal,
   svn_client__checkout_internal):
      Move output arguments to front. Accept optional existing ra session.
  (svn_client__handle_externals): Accept optional existing ra session.

* subversion/libsvn_client/copy.c
  (repos_to_wc_copy_single): Update caller. Remove unneeded local variable, as
      we can just pass the variable from our caller.

* subversion/libsvn_client/externals.c
  (switch_dir_external): Accept ra session from caller. Update caller.
  (handle_external_item_change): Accept ra session from caller. Use this if
     possible to avoid always creating another ra session. Update caller.
  (handle_externals_change,
   svn_client__handle_externals): Pass ra session.

* subversion/libsvn_client/switch.c
  (switch_internal): Update caller.

* subversion/libsvn_client/update.c
  (update_internal): Separate pool handling. Reorder arguments to standard.
    Update caller.
  (svn_client__update_internal): Move output arguments to front. Accept
    optional existing ra session. Use iterpool.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1635753 13f79535-47bb-0310-9956-ffa450edef68