ox: Fix inline footnote definitions

* lisp/ox.el (org-export-collect-tree-properties): Make sure changes
  to the parse tree propagate to the value of
  `org-export-get-footnote-definition'.

Thanks to Florian Beck for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/88419
org-element: Fix "wrong-type-argument" error in cache

* lisp/org-element.el (org-element--cache-sync): Do not copy phase
  number into next request.  This is a special case that deserves to
  be handled locally.  See below.
(org-element--cache-process-request): Properly transfer phase in
a special case, which is now commented.  Also fix phase numbers in
comments.  Small refactoring.

Thanks to Alan Schmitt for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/88406
org-element: Fix corner case in cache synchronization

* lisp/org-element.el (org-element--cache-submit-request): When
  changes happen before first know element, start from phase 1 instead
  of phase 2 in order to properly re-parent subsequent elements, if
  needed.
(org-element--cache-process-request): Do not propagate beginning
position since it is already available to the request.
org-element: Fix re-parenting during cache synchronization

* lisp/org-element.el (org-element--cache-process-request): Correctly
  re-parent elements in cache in some corner cases.
* testing/lisp/test-org-element.el (test-org-element/cache): Add tests.
org-clean-before-export matches non-special columns spuriously

* org-table.el (org-table-clean-before-export): The regexes match
  spaces in addition to the special characters that might be used in
  the first column as special marking characters.  Remove the space
  from the character class.

  In addition, the `special' variable included a backslash which
  afaict does nothing: delete it.

  The function itself takes an optional parameter which is not used by
  any of the callers: get rid of it.  Getting rid of it allows a small
  simplification of the code.

The bug was found by Thorsten Grothe:

    http://thread.gmane.org/gmane.emacs.orgmode/88634
Merge branch 'maint'

Merge bug fix for org-table.el:org-table-clean-before-export.
org-element: Better collision handling in cache sync requests

* lisp/org-element.el (org-element--cache-process-request): Handle
  cases where procesing the first request brings us past the start of
  the next one.
org-element: Fix infloop in cache

* lisp/org-element.el (org-element--cache-process-request): Take into
  consideration changes to come so as to avoid parsing elements with
  false beginning positions.
(org-element--cache-sync): Change signature.

Thanks to Thorsten Jolitz for reporting it.
http://permalink.gmane.org/gmane.emacs.orgmode/88673
org-element: Small optimization

* lisp/org-element.el (org-element--cache-for-removal): Do not remove
a robust element whenever only its contents are modified.  Remove
inlinetasks as robust elements since modifying a node property inside
implies to parse the task again.
org-element: Fix regexp matching LaTeX environments

* lisp/org-element.el (org-element--current-element): Fix regexp
  matching latex environments.  Discrepancy with regexp used in
  `org-element-latex-environment-parser' introduced matching errors.
Merge branch 'maint'