Reduced time holding locks for statistics

When dealing with statistics, this requires that when the application
instance is constructed, the available statistics categories be listed
so that a partial statistics dictionary can be pre-built, reducing the
amount of time `ApiWSGIApplication#update_statistics` needs to hold the
lock. These are registered through a new `statistics_categories`
parameter.

Additionally, a dictionary of locks -- one for each category -- will now
be built out, introducing category-level locking. This means that
different parts of the dictionary can now be updated by different
threads and a lock is only required when updating the same category.

Finally, this enables statistics to be disabled application-wide by
setting `statistics_categories` to something falsey or by omitting it.