Stop reloading siteconfigs on every request, and fix log reloads.

We were reloading siteconfigs on every single request, which was
unnecessary. It was only necessary to reload if the siteconfig had
changed since it was last used. This wasn't particularly time-consuming,
but it was extra work that shouldn't be needed, and it made it hard to
handle reloads of logging.

To track whether a siteconfig should be reloaded, we now check a private
flag on the SiteConfiguration. If it's not set, we perform a full reload
(which now restarts logging as well, something that was missing and hard
to do correctly before). If it is set, we do nothing.

Reviewed at https://reviews.reviewboard.org/r/5931/