FIX: Move stage choosing into a pre-request filter.

This ensures that the correct stage is selected, even if the request
does not come through the model as controller system. This fixes an
issue where custom controllers would always be on the "Stage" stage.
Merge pull request #2586 from ss23/3.0-staging-fix

FIX: Move stage choosing into a pre-request filter.