Fix Index#commit and implement Commit#stats