Added Rugged, converted existing Grit code

Description incomplete, coming :soon:  

Here's a [Working demo](http://glittergallery-ropaku.rhcloud.com/) and a [Test Project](http://glittergallery-ropaku.rhcloud.com/rohitpaulk/TestProject1) that I set up.
Hey. I'm not able to reproduce this on my local.

Here's the flow I followed - 
* Create New project
* Click on add files 
* Upload the file 

I don't see a problem with the existing code, and the changes you mentioned don't work on my system either. Here's the error - 
```
1.9.3-p545 :009 > project.barerepo.lookup(headcommit)
TypeError: wrong argument type Rugged::Commit (expected String)
	from /home/vagrant/.rvm/gems/ruby-1.9.3-p545/bundler/gems/rugged-7c354728ba7c/lib/rugged/repository.rb:99:in `lookup'
	from /home/vagrant/.rvm/gems/ruby-1.9.3-p545/bundler/gems/rugged-7c354728ba7c/lib/rugged/repository.rb:99:in `lookup'
	from (irb):9
	from /home/vagrant/.rvm/gems/ruby-1.9.3-p545/gems/railties-4.0.3/lib/rails/commands/console.rb:90:in `start'
	from /home/vagrant/.rvm/gems/ruby-1.9.3-p545/gems/railties-4.0.3/lib/rails/commands/console.rb:9:in `start'
	from /home/vagrant/.rvm/gems/ruby-1.9.3-p545/gems/railties-4.0.3/lib/rails/commands.rb:62:in `<top (required)>'
	from bin/rails:4:in `require'
	from bin/rails:4:in `<main>'
```
`barerepo.lookup` accepts an oid as a string, and [returns the object](https://github.com/libgit2/rugged/blob/4d32a0894dc6cbfa2a11d75e1cb980f4a0ad648f/lib/rugged/repository.rb#L98) corresponding to that oid (In this case, it's a tree, because we're passing in a tree id). So passing `headcommit` to `barerepo.lookup`, should not work. I still can't figure out how `headcommit` turned out to be a string in your case.

headcommit = repo.head.target

[repo.head returns a reference](https://github.com/libgit2/rugged/blob/development/ext/rugged/rugged_repo.c#L928), and [head.target should return a commit](https://github.com/libgit2/rugged/blob/development/ext/rugged/rugged_reference.c#L118). 

Could you try again and tell me if I've done something wrong?