which-function: Do not display outdated imenu information
* lisp/progmodes/which-func.el (which-function): Check `add-log-current-defun' before imenu. Update `imenu--index-alist' if needed. Bug#33695
* lisp/progmodes/which-func.el (which-function): Check `add-log-current-defun' before imenu. Update `imenu--index-alist' if needed. Bug#33695