* lisp/progmodes/compile.el: Use non-nil values for *-function
(compilation-parse-errors-filename-function,compilation-exit-message-function)
(compilation-process-setup-function, compilation-buffer-name-function):
Give them non-nil default values.
(compilation-buffer-name): Restructure slightly.
(compilation--default-buffer-name): New function, extracted from it.
Use `name-of-mode` instead of `mode-command` to check if the current
buffer is already in the appropriate mode.