ssl: init only once without threads

The OpenSSL library-loading functions do not expect to be called
multiple times. Add a flag in the non-threaded libgit2 init so we only
call once.

This fixes #2446.
ssh: create the right callback signature based on build options

When linking against libssh2, create the transport.h such that it
contains its definition for custom crypto and keyboard-interactive
callbacks.

If we don't link against libssh2, create an equivalent signature which
has void pointers instead of pointers to libssh2 structures.

This would be one way to fix #2438.
ssh: always declare the libssh2 types

This lets a user decide they do want to use keyboard-interactive after
they've compiled.
Introduce cl_assert_equal_oid
revwalk::simplify test should test

The revwalk::simplify test was not actually tested the values from
the revwalk against the expected.  (Further, the expected had two
IDs transposed.)
git_checkout_index: checkout other indexes

git_checkout_index can now check out other git_index's (that are not
necessarily the repository index).  This allows checkout_index to use
the repository's index for stat cache information instead of the index
data being checked out.  git_merge and friends now check out their
indexes directly instead of trying to blend it into the running index.
clone: add a callback for repository creation

Analogously to the remote creation callback, provide a way for the user
of git_clone() to create the repository with whichever options they
desire via callback.
clone: remote git_clone_into{,_local} from the public API

As git_clone now has callbacks to configure the details of the
repository and remote, remove the lower-level functions from the public
API, as they lack some of the logic from git_clone proper.
ssh: libssh2_channel_write() behaves like send()

When the stream writing function was written, it assume that
libssh2_channel_write() would always write all of the data to the
wire. This is only true for the first 32k of data, which it tries to
fit into one ssh packet.

Since it can perform short writes, call it in a loop like we do for
send(), advancing the buffer offset.
Merge pull request #2456 from libgit2/cmn/ssh-send-everything

ssh: libssh2_channel_write() behaves like send()
Merge pull request #2452 from libgit2/cmn/clone-custom-repo

Provide a callback to customize the repository on clone
Merge pull request #2453 from ethomson/checkout_index

git_checkout_index: checkout other indexes
Merge pull request #2455 from ethomson/equal_oid

Introduce `cl_assert_equal_oid`
Merge pull request #2449 from libgit2/cmn/maint-21

Maint fixes for ssl initing and ssh exposure