This takes a similar approach as b9b6938183e, and shares some code.
The code sharing is limited as inlay hints wants to deduce the type of the
variable rather than the type of the auto per-se.
It drops support (in both places) for multiple instantiations yielding the same
type, as this is pretty rare and hard to build a nice API around.
Why Optional if TypeLoc can represent a null type loc?