[Console] Autocomplete cleanups/optimisations
merged branch lmcd/autocomplete-cleanups (PR #6594)

This PR was squashed before being merged into the master branch (closes #6594).

Commits
-------

9d94fc7 [Console] Autocomplete cleanups/optimisations

Discussion
----------

[Console] Autocomplete cleanups/optimisations

I know the optimisations to this code are getting kinda ridiculous, but I found a few more things to tidy up.
[Routing] made RouteCompilerInterface::compile static
merged branch Tobion/static-compile (PR #6491)

This PR was squashed before being merged into the master branch (closes #6491).

Commits
-------

5d264ce [Routing] made RouteCompilerInterface::compile static

Discussion
----------

[Routing] made RouteCompilerInterface::compile static

bc break: yes but probably nobody affected

It makes much more sense that the compile method is static because having instances of a compiler is strange. Also the compiler could not use DI or anything anyway as the `Route` class was instantiating compiler instances itself and was assuming there are no constructor arguments.