Silence many eshell compilation warnings

* lisp/eshell/em-tramp.el: Adjust requires.
(eshell-parse-command): Autoload.

* lisp/eshell/em-xtra.el: Adjust requires.
(eshell-parse-command): Autoload.

* lisp/eshell/esh-ext.el: Adjust requires.
(eshell-parse-command, eshell-close-handles): Autoload.

* lisp/eshell/esh-io.el: Adjust requires.
(eshell-output-filter): Autoload.

* lisp/eshell/esh-util.el: No need to load tramp when compiling.
(tramp-file-name-structure, ange-ftp-ls, ange-ftp-file-modtime): Declare.
(eshell-parse-ange-ls): Require ange-ftp and tramp.

* lisp/eshell/em-alias.el, lisp/eshell/em-banner.el, lisp/eshell/em-basic.el:
* lisp/eshell/em-cmpl.el, lisp/eshell/em-glob.el, lisp/eshell/em-pred.el:
* lisp/eshell/em-prompt.el, lisp/eshell/em-rebind.el, lisp/eshell/em-smart.el:
* lisp/eshell/em-term.el, lisp/eshell/esh-arg.el, lisp/eshell/esh-mode.el:
* lisp/eshell/esh-opt.el, lisp/eshell/esh-proc.el:
* lisp/eshell/esh-var.el: Adjust requires.

* lisp/eshell/eshell.el: Do not require esh-util twice.
(eshell-add-input-to-history): Declare.
(eshell-command): Check history module is active before using it.
* lisp/url/url.el (mm-dissect-buffer, mm-display-part): Declare.
Silence vera-mode compilation

* lisp/progmodes/vera-mode.el (he-init-string, he-dabbrev-beg)
(he-string-member, he-reset-string, he-substitute-string): Declare.
Silence checkdoc.el compilation

* lisp/emacs-lisp/checkdoc.el: No need to load ispell when compiling.
(ispell-process, ispell-buffer-local-words, lm-summary)
(lm-section-start, lm-section-end): Declare.
(checkdoc-ispell-init): Simplify.
Silence some gnus compilation warnings

* gnus/mm-decode.el: No need to load term when compiling.
(term-mode, term-char-mode): Declare.

* gnus/mm-util.el: No need to load jka-compr when compiling.
(jka-compr-acceptable-retval-list, jka-compr-make-temp-name): Declare.

* gnus/nnmaildir.el: Require is automatically eval-and-compile.
(nnmail): Require at run-time too.

* gnus/registry.el (registry-size): Move definition before use.
Silence ediff compilation

* lisp/vc/ediff-diff.el, lisp/vc/ediff-merg.el: Require ediff-util at run-time.

* lisp/vc/ediff-mult.el: Adjust requires.
(ediff-directories-internal, ediff-directory-revisions-internal)
(ediff-patch-file-internal): Declare.

* lisp/vc/ediff-ptch.el: Adjust requires.
(ediff-use-last-dir, ediff-buffers-internal): Declare.
(ediff-find-file): Autoload.

* lisp/vc/ediff-util.el: No need to load ediff when compiling.
(ediff-regions-internal): Declare.

* lisp/vc/ediff-wind.el: Adjust requires.
(ediff-compute-toolbar-width): Define when compiling.
(ediff-setup-control-buffer, ediff-make-bottom-toolbar): Declare.

* lisp/vc/ediff.el: No need to load dired, ediff-ptch when compiling.
(dired-get-filename, dired-get-marked-files)
(ediff-last-dir-patch, ediff-patch-default-directory)
(ediff-get-patch-buffer, ediff-dispatch-file-patching-job)
(ediff-patch-buffer-internal): Declare.
Silence some js compilation warnings

* lisp/progmodes/js.el: No need to load comint when compiling.
(ring-insert, comint-send-string, comint-send-input)
(comint-last-input-end, ido-chop): Declare.
Fix declaration typo
Silence gnus-util compilation

* lisp/gnus/gnus-util.el (rmail-swap-buffers-maybe)
(rmail-maybe-set-message-counters, rmail-count-new-messages)
(rmail-summary-exists, rmail-show-message, rmail-summary-displayed)
(rmail-pop-to-buffer, rmail-maybe-display-summary): Declare.
Silence em-ls compilation

* lisp/eshell/em-ls.el: Adjust requires.
(eshell-glob-regexp): Declare.
* net/tramp-gvfs.el (top):
* net/xesam.el (xesam-dbus-unique-names): Suppress D-Bus errors
when loading package.  (Bug#14447)
test/automated/decoder-tests.el: New file
merge trunk
test/automated/decoder-tests.el: New file
* src/keyboard.c (read_decoded_char): Don't decode under w32.
* lisp/textmodes/reftex-parse.el (reftex-locate-bibliography-files):
  Accept options for bibliography commands.
* lisp/textmodes/reftex-vars.el (reftex-bibliography-commands): Add
  addbibresource.  Basic Biblatex support.
* lisp/textmodes/reftex-vars.el (reftex-ref-style-alist): Add cleveref
  macros.
* lisp/textmodes/reftex.el (reftex-ref-style-toggle): Fix deactivate
  action.
* lisp/ielm.el (ielm-menu): New menu.
(inferior-emacs-lisp-mode): Set comment-start.
Don't apply keyboard decoding to unread-command-events.
* src/keyboard.c: Apply keyboard decoding only to events that come directly
from the tty, not from unread-command-events (bug#14368).
(read_event_from_main_queue): New function, extracted from read_char).
(read_decoded_char): Remove.
(read_decoded_event_from_main_queue): New function to replace it.
(read_char): Use it.
(read_key_sequence): Use read_char rather than read_decoded_char.