mode/element-hint: Refactor query-hints.
mode/element-hint: Refactor query-hints.

Adds the possibility to exit the prompt as soon as the user selects an element
hint.

See issue #2185.

jmercouris/NeXT,jmercouris/NeXT