Improve language support in the menu

The symbols in the menu are parsed by imenu. But the imenu function
that was called (imenu--generic-function) was not appropriate. It seems
to be a fallback method.

It was used because initially cc-imenu-c-generic-expression and
cc-imenu-c++-generic-expression were overriden. This was removed in
version 1.9.

Now the proper way to do it is to use imenu--index-alist.

Many more languages are supported (Perl, Python, ...).

Signed-off-by: Cédric Marie <cedric.marie@openmailbox.org>
Update the list of symbols when necessary

Update the list of symbols in the menu (if unfolded), when:
- the current buffer is saved,
- some buffers are updated.

Signed-off-by: Cédric Marie <cedric.marie@openmailbox.org>
Fix menu update when applying actions on files

When updating imenu list of symbols, ask not to report an error when
the list is empty. It causes menu update to fail.

Signed-off-by: Cédric Marie <cedric.marie@openmailbox.org>