Decrease timeout for trac-sync test

Two seconds *should* be enough (famous last words). Lowering this makes
testing also more bearable.
Diagnostics: add Trac environment checks

The new diagnostics checks are:
 * check if a trac env points to an existing repository
 * check if all necessary modules are enabled

Modules that should be enabled include:
 * vcs-specific connectors (tracopt.versioncontrol.<vcs>.*)
 * commit updater (tracopt.ticket.commit_updater.*)

If that last one is not enabled, comments will not be added after a
commit/push (refs #371).

The options will be checked including wildcards, so if for example
tracopt.versioncontrol.<vcs>.<whatever> is not present, but
tracopt.versioncontrol.<vsc>.* is enabled, the option will not be
reported as missing.
Diagnostics: add another Trac config check (fixes #371)

Added another check: commit_ticket_update_check_perms = false. This
should be set to false if you use git.

In order to add these test to the previous ones (they all tested
in the 'components' section, while this new one is in the 'ticket'
section), we changed the datatypes a little bit. Also, for each
option, we show if it is fatal or not, so the administrator can
decide better to ignore or follow our recommendation.

I think it's also better to say 'OK', 'Warn' and 'Fail' instead of
'Yes', 'Warn' and 'No', because we can use it in other parts as well
and it is easier to interpret (no need to read the text in front).
Added TOC to diagnostics (fixes #358)

Because adding the TOC changed the way everything looked, I've updated
many appearance things as well. The result is, I think, much cleaner
when there are no failures/warnings and when there are many failures or
warnings, the more clear separation of sections and their options makes
it easier to see what belongs to what.
Provide links to trac.ini as well (refs #371)

Because of the update in appearance, we slightly changed the warnings and
failures of the missing configuration. The text that was shown for each
environment is now shown once at the bottom of the list, while a link to
the trac.ini (copy+paste only) and the Trac Admin panel (href) is provided
for each problematic environment.

To better distinguish the preformatted text from the rest, the diag_pre
CSS class is now subtly hilighted (off-white background color + border).
Diagnostics: Fix assumption about existing setting

Apparently, it is possible to not have a repository_type and still
have a functioning environment. It defaults to svn in that case,
so we do that too.