Checkout

This adds the `Repository#checkout` method to switch or detach `HEAD`, and `Repository#checkout_tree` to checkout all or individual files from a specific branch/commit/tag/revspec.