Type check the tree value for Rugged::Index#read_tree

libgit2 does no type checking in `git_index_read_tree` which means that
`index.read_tree` will segfault if you pass something other than a tree.

This ensures that the value passed is actually a tree.