Checkout: Unifiy const-ness of `opts` parameter

Since all 3 checkout APIs perform the same operation with the options,
all of them should use the same const-ness.
Checkout: Don't assert if treeish is NULL

In git_checkout_tree, the first check tests if either repo or treeish is
NULL and says that eithor of them has to have a valid value. But there
is no code to handle the treeish == NULL case.

So, do something meaningful in that case: use HEAD instead.
Checkout: git_checkout_head is git_checkout_tree without a treeish

The last commit taught git_checkout_tree to actually do something
meaningfull, when treeish was NULL. This lets us rewrite
git_checkout_head to simply call git_checkout_tree without giving it a
treeish.
Merge pull request #1937 from scunz/checkout_assert

Don't assert in git_checkout_tree