gitweb: Factor out gitweb_have_snapshot()