Adjust the format_loc filter to allow supporting multiple code table in a single page

Relates to http://209.132.184.222/progit/issue/29
Provide the commit index when building the diff view in the pull-request page