Add code action to generate missing type definitions
When an unknown type is referenced in the source, the language server
now offers a "Generate type" code action that inserts a type stub
before the containing definition. For example:
pub fn wibble(arg: Wibble) { todo }
generates:
type Wibble
pub fn wibble(arg: Wibble) { todo }
Parameterised types use the original names from the call site:
Wibble(some, generics) → pub type Wibble(some, generics)
Types used in public contexts are generated as pub.
Closes #5389