Avoid PHP notices
Force rewrite rules generation on new and existing blogs

There is a WordPress bug that causes the initial rewrite rules on a newly
created blog to be incorrect, because they are generated before core taxonomies
are registered. See https://core.trac.wordpress.org/ticket/20171. This breaks
tag and category archive links.

As a workaround, this changeset does the following:

1. Hook late into the blog creation process, force the registration of the
   relevant taxonomies, and flush rewrite rules. This fixes the problem for
   newly created blogs.
2. Hook into 'init' on every page load. For those blogs that don't have our
   'openlab_rewrite_rules_flushed' flag set, flush the rewrite rules, and set
   the flag. This fixes the problem for existing blogs.

See #1054