Tags as refs

# Tags as References

This pull request changes the `Rugged::Tag` API heavily by making all tags subclasses of `Rugged::Reference`. This fixes some discrepancies in the current Tag API, aligns them to the Reference and Branch API and makes it overall easier to use and understand.

## Issues with the existing API

Currently, the Tag API exposed in Rugged only works on `git_tag` ODB objects, as exposed by libgit2. The problem with this is that it completely hides the fact that a tag in git can actually either be a ref pointing to an actual tag object inside the ODB (annotated tag), or a simple ref pointing to any other ODB object type (commit, blob, tree) inside the `refs/tags/` namespace.

Let's take a look at the current `Rugged::Tag` API:

 * `Rugged::Tag#each` iterates over both tag types (heavy and lightweight), and yields their names as strings to the given block. `Rugged::Reference` and `Rugged::Branch` yield actual objects, and expose a `#each_name` method for iterating over branch/ref names.

 * `Rugged::Tag.delete` works with tag names only.

 * There is no `Rugged::Tag.lookup`. If a user wants to get the target of a tag, he has to go through `Rugged::Repository#rev_parse`, and then build a condition on top that handles the differences between an annotated and a lightweight tag, like this:

   ```ruby
   def find_tag_target(tag_name)
      target = repo.rev_parse("refs/tags/#{tag_name}")
      if target.is_a?(Rugged::Tag)
        target = repo.lookup(target.target)
      end
      return target
   rescue Rugged::ReferenceError
      return nil
   end
   ```

   Yuck!

 * `Rugged::Tag` objects always represent an annotated tag from the ODB - there is no class representing lightweight tags.

These points lead to the fact that strings containing the tag names are currently the best way to work with tags in Rugged - and passing around strings is bad.

## Proposed new API

The proposed API is mostly lifted from the tag API exposed in libgit2sharp, and breaks the Tag API into two different classes, `Rugged::Tag` and `Rugged::TagAnnotation`.

There now exist two classes wrapping different aspects of git tags:

 * `Rugged::Tag` - A subclass of `Rugged::Reference`, that represents both tag types and normalizes working with them. It provides a sweet API for working with tags:

   * `Rugged::Tag.each` now yields instances of `Rugged::Tag`.
   * `Rugged::Tag.each_name` yields tag names as strings.
   * `Rugged::Tag.lookup` allows looking up a tag by its short name or by the full ref name.
   * `Rugged::Tag#target` always returns the target object. This is the target of the ref for a lightweight tag, or the target of the tag annotation for an annotated tag.
   * `Rugged::Tag#annotated?` allows to check whether a tag is annotated or not.
   * `Rugged::Tag#annotation` returns the annotation data for annotated tags. This is an instance of `Rugged::TagAnnotation`.

 * `Rugged::TagAnnotation` - A subclass of `Rugged::Object`, representing `git_tag` objects. This is basically what `Rugged::Tag` was before, and allows to access the annotation information of annotated tags.

Additionally, I changed the signature of `Rugged::Tag.create` to be a bit easier to use.

Using this new API, the previously shown code now becomes so much simpler:

```ruby
def find_tag_target(tag_name)
  tag = Rugged::Tag.lookup(tag_name)
  tag && tag.target
end
```

Another advantage of the new API is that tags are now subclasses of `Rugged::Reference`, and can be used in **all** places that a `Rugged::Reference` was expected before.

```ruby
def last_ten_commits(ref)
  if ref.target.is_a?(Rugged::Commit)
    raise "#{ref} does not point to a commit"
  end

  result = [target]
  while result.length < 10 && target.last.parents.first
    result << target.last.parents.first 
  end
  result
end

# last 10 commits on an arbitrary ref
last_ten_commits(Rugged::Reference.loookup(repo, 'refs/pulls/123'))

# last 10 commits on a branch
last_ten_commits(Rugged::Branch.loookup(repo, 'development'))

# last 10 commits leading up to a tag
last_ten_commits(Rugged::Tag.loookup(repo, 'v1.0'))
```