Fix update of buffer status in the menu

Updating the symbols of a buffer fails if its major mode is not
supported by imenu. As a consequence, the status of the buffer is not
updated in the menu buffer.

While imenu--make-index-alist provides a noerror argument,
imenu-default-create-index-function does not and reports an error if it
fails. Therefore it is necessary to check that a method is available
for this particular major mode before calling imenu--make-index-alist.

Signed-off-by: Cédric Marie <cedric.marie@openmailbox.org>
Factorise the update of status and symbols

Factorise the code that updates the status (REF/NEW and VC) and the
list of symbols of a buffer.

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