gitweb: Move generating page title to separate subroutine