Add index json endpoint and as_json for repos

LM-BOS-00676321:lolcommit-server jhilker$ bundle exec rake
/Users/jhilker/.rbenv/versions/1.9.3-p362/lib/ruby/gems/1.9.1/gems/psych-1.3.4/lib/psych.rb:96: warning: already initialized constant VERSION
/Users/jhilker/.rbenv/versions/1.9.3-p362/lib/ruby/gems/1.9.1/gems/psych-1.3.4/lib/psych.rb:99: warning: already initialized constant LIBYAML_VERSION
Run options: 

# Running tests:

...........

Finished tests in 3.867908s, 2.8439 tests/s, 6.2049 assertions/s.

11 tests, 24 assertions, 0 failures, 0 errors, 0 skips
/Users/jhilker/.rbenv/versions/1.9.3-p362/lib/ruby/gems/1.9.1/gems/psych-1.3.4/lib/psych.rb:96: warning: already initialized constant VERSION
/Users/jhilker/.rbenv/versions/1.9.3-p362/lib/ruby/gems/1.9.1/gems/psych-1.3.4/lib/psych.rb:99: warning: already initialized constant LIBYAML_VERSION
Run options: 

# Running tests:

.................................

Finished tests in 0.960387s, 34.3611 tests/s, 79.1348 assertions/s.

33 tests, 76 assertions, 0 failures, 0 errors, 0 skips