A Bridge Authority should compute flag thresholds

As a bridge authority, before we create our networkstatus document, we
should compute the thresholds needed for the various status flags
assigned to each bridge based on the status of all other bridges. We
then add these thresholds to the networkstatus document for easy access.
Fixes for #1117 and #9859.
Merge remote-tracking branch 'sysrqb/bug9859_5'
Whitespace cleanup