org-element: Prepare signature change

* lisp/ob-exp.el: Declare signature change.
* lisp/org-macro.el: Declare signature change.
* lisp/org.el (org-backward-element, org-drag-element-backward): Avoid
  using optional argument from `org-element-at-point'.
* testing/lisp/test-org-element.el: Update test.
org-element: Speed-up for `org-element-at-point'

* lisp/org-element.el (org-element-at-point): Rewrite function. Remove
  optional argument.

Include an opportunistic search at the beginning of the function.  It
drastically improves speed on large sections for a small overhead on
small ones.
org-colview: Silence byte-compiler
org-element: Optimize parser only when cache is active

* lisp/org-element.el (org-element-at-point): Try opportunistic
  shortcut only when cache is active.
Revert "Ensure that file local variables are set"

This reverts commit 5ea02285bacb9592b20c95d4797ca7c2ec68ecac.

York Zhao ran into an infinite recursion with this "fix".
Second try: Ensure that file local variables are set

* lisp/org.el (org-mode-restart): Call normal-mode,
  instead of org-mode. This will set the mode but it
  will also set file local variables properly.

Reported by Tom Dye: C-c C-c on e.g an #+OPTIONS line
would lose file local variable settings.

The original fix (commit 5ea0228) was incorrect: if the
local variable was a mode setting, then we ended up in an
"infinite" recursion. Problem found, reported and a reproducer
provided by York Zhao.
org: fix commit 0911edfac8

* lisp/org.el (org-mode-restart): After `normal-mode´ the mode may not
  be "org-mode".  Explicitly switch to org-mode in that case.
org: check for derived-mode-p instead of "org-mode" exactly

* lisp/org.el (org-mode-restart): Check for derived-mode-p instead of
  "org-mode" exactly.  This covers a situation normal-mode already
  instantiates a derived mode (e.g. via file local variables).
org.el (org-cycle-hide-drawers): Fix bug about re-searching at the wrong side of point

* org.el (org-cycle-hide-drawers): Fix bug about re-searching
at the wrong side of point.

The bug was introduced by this commit:
http://orgmode.org/cgit.cgi/org-mode.git/commit/?id=e8bafd

And reported here:
http://article.gmane.org/gmane.emacs.orgmode/79282
ox-freemind: Fix comma error when exporting

* contrib/lisp/ox-freemind.el (org-freemind-export-to-freemind): Fix
  code typo.

Reported-by: Jan-Mark Batke <badkey@gmx.net>
Merge branch 'maint'
ox: Fix cache confusion during export

* lisp/ox.el (org-export--generate-copy-script): Do not share cache
  when copying buffers since keys and values are modified by
  side-effect.
ox: Fix erroneous code comment

* lisp/ox.el (org-export--generate-copy-script): Fix code comment.