Moved order of plugin setup back to pre 5.90052 location

In 17176f15aa (v5.90052) the plugin setup block was moved up to be
called immediately after setup_plugins(), however, this causes issues
with initialization order of other plugins that hook into setup(). This
commit moves the block back down to just before setup_components, where
it used to be.
Moved setup_middleware() to after plugin setup block

After moving the plugin setup block back down to its pre 5.90052
location, the setup_middleware() call also needed to be moved, now after
that block and immediately before setup_components. All tests now seem
to pass.
prep for release