gitweb: Refactor common parts of 'log' and 'shortlog' views