Fix CounterField initialization

CounterField's _reinit method was returning back control if the pk of the model
wasnt setup yet. This caused any of the "initializers" to not fire for the very
first time. Modified the logic so that control returns back if the model's pk is
None and there are no initializers defined. The earlier fix
(https://github.com/djblets/djblets/commit/5f38334fabfd282232908ef80b28cd1889d0871c#djblets/util/fields.py)
was setting the value to 0 if the pk wasnt available at the time. I've modified
the logic so that the method _reinit returns back immediately (without
processing the counter value) only if the pk is none and there are no
initializers defined. For the case of LocalSiteProfiles table, there are
initializers defined for all CounterFields, so they would be initialized the
first time the object is created.

With this fix, there is still a problem in calculating counts on the
LocalSiteProfiles for starred_public_request_counts. This is fixed in review
request #3842 (http://reviews.reviewboard.org/r/3842/)

Testing done:
Manual testing with regular and creating local sites and ensured that the first
time was seeing counts rather than None. Ran all reviewboard tests.

Fixes part of bug 2873.
Reviewed at http://reviews.reviewboard.org/r/3841/
Release Djblets 0.7.10.
Bump to 0.7.11 dev.
Provide a Admin UI setting to change Log Levels

Allow Logging level to be setup in Admin UI

Currently, the logging level can only be setup only in settings_local.py which
makes it difficult to change the value. Provide a dropdown in the Admin->Logging
Screens that shows the various logging levels.

Added default value for logging_level in siteconfig.py as well as mapped the
field shown in the UI to the internal variable in siteconfiguration tables.

This patch goes along with the Reviewboard change at #3852
(http://reviews.reviewboard.org/r/3852/)

Testing done:
Verified in fresh setup (devserver) where it defaults to the DEBUG level.  Since
this only gets stored in siteconfig_siteconfiguration table, shouldn't need any
migration changes. Changed the level manually in the UI and verified that DEBUG
messages dont appear anymore.

Also the Filter in Admin->Server Log shows only the LogLevel selected and
anything above it. For e.g. if the logging is set to ERROR, the filters in
Server Log only show Error, Critical and ALL.

Addresses bug 1859.
Reviewed at http://reviews.reviewboard.org/r/3851/
Fix admin-urls for extensions when SITE_ROOT != '/'

In the case of custom SITE_ROOTs, the calculation of the extensions' 'db/'
and 'config/' seem to use the reverse function for extension_list method and
then append it to the DynamicUrlResolvers' add_patterns method. This adds an
additional SITE_ROOT pattern as reverse(extension_list) itself returns the
path with the SITE_ROOT. So, instead of the url for SITE_ROOT='/reviews/' being
reviews/admin/extensions/rbcustomreports.extension.CustomReportsExtension/config/
it turns out to be
reviews/reviews/admin/extensions/rbcustomreports.extension.CustomReportsExtension/config/

Fixed this by lstrip-ing the SITE_ROOT after getting a reverse function so that
dynamic url resolver adds it properly. This should work for SITE_ROOT='/' or
custom SITE_ROOTs.