Extract commit-stats.rb into a library

Extract a library from commit-stats.rb so it can be reused for a web
app.

Change-Id: Ib209bb70cfbe728f5f718340fc2e5e745aee2e3f
Reviewed-on: https://gerrit.causes.com/22008
Reviewed-by: Jimmy Kittiyachavalit <jimmy@causes.com>
Tested-by: Jimmy Kittiyachavalit <jimmy@causes.com>
Create a sinatra app to display commit stats

The web app has one page that shows the number of commits for each
person and a breakdown by repository--same as ./bin/commit-stats. By
default, it analyzes the past 14 days; you can specify a different
timespan through the `days_ago` GET parameter.

Change-Id: Icc9df2bbce308070804b765d7918a1ea60912cb5
Reviewed-on: https://gerrit.causes.com/22009
Reviewed-by: Jimmy Kittiyachavalit <jimmy@causes.com>
Tested-by: Jimmy Kittiyachavalit <jimmy@causes.com>