[Console] [DialogHelper] Make DialogHelper::ask() accept anon function for dynamic option lists.

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | no
| Fixed tickets | 
| License       | MIT
| Doc PR        | 

DialogHelper::ask() currently only accepts a static array for autocomplete. In my use case, I needed a dynamic list based off of the results of an API call. This patch allows the caller to pass in an anonymous function as well as an array for $autocomplete.
Yes casting `(array) $autocomplete($ret)` is a good to asserts that `$matches` always contains an array