org-element: Handle special cases in setter functions

* contrib/lisp/org-element.el (org-element-put-property,
  org-element-set-contents): Handle special cases like empty or string
  arguments.
(org-element-parse-secondary-string): Correctly set `:parent' property
in objects within the secondary string if element or object containing
it is provided as an optional argument.
(org-element-parse-elements, org-element-parse-objects): Rewrite
functions using setter functions.
org-export: Fix table test failure

* contrib/lisp/org-element.el (org-element-center-block-parser,
  org-element-drawer-parser, org-element-dynamic-block-parser,
  org-element-footnote-definition-parser, org-element-headline-parser,
  org-element-inlinetask-parser, org-element-item-parser,
  org-element-plain-list-parser, org-element-quote-block-parser,
  org-element-section-parser, org-element-special-block-parser,
  org-element-babel-call-parser, org-element-clock-parser,
  org-element-comment-parser, org-element-comment-block-parser,
  org-element-example-block-parser, org-element-export-block-parser,
  org-element-fixed-width-parser, org-element-horizontal-rule-parser,
  org-element-keyword-parser, org-element-latex-environment-parser,
  org-element-paragraph-parser, org-element-planning-parser,
  org-element-property-drawer-parser,
  org-element-quote-section-parser, org-element-src-block-parser,
  org-element-table-parser, org-element-table-row-parser,
  org-element-verse-block-parser, org-element-bold-parser,
  org-element-code-parser, org-element-entity-parser,
  org-element-export-snippet-parser,
  org-element-footnote-reference-parser,
  org-element-inline-babel-call-parser,
  org-element-inline-src-block-parser, org-element-italic-parser,
  org-element-latex-fragment-parser, org-element-line-break-parser,
  org-element-link-parser, org-element-macro-parser,
  org-element-radio-target-parser,
  org-element-statistics-cookie-parser,
  org-element-strike-through-parser, org-element-subscript-parser,
  org-element-superscript-parser, org-element-table-cell-parser,
  org-element-target-parser, org-element-timestamp-parser,
  org-element-underline-parser, org-element-verbatim-parser): Use
  `list' instead of backquotes to avoid using a quoted constant list
  as a non-last argument to `nconc'.
org-element: Inline accessors

* contrib/lisp/org-element.el (org-element-type, org-element-property,
  org-element-contents, org-element-restriction): Inline functions.
org-export: Fix a docstring

* contrib/lisp/org-export.el (org-export-translate): Fix docstring.
further cleanup for org version

* UTILITIES/org-fixup.el (org-make-org-version): Provide feature
  'org-version.
* lisp/org-compat.el (org-check-version): New macro.  Check if
  org-version.el exists and provide autoloads to that. Otherwise check
  if org-fixup.el exists and use it to provide definitions.  Finally
  if nothing worked, complain about a botched installation and provide
  fallback definitions.
* lisp/org.el: Use org-check-version.

This should finally provide the correct behaviour in all supported
use-cases as well as a few corner scenarios that were reported on the
mailing list and allow to always build on Git, ELPA and Emacs Bzr
correctly.  The file org-version.el must be added to the Emacs sources
and should be re-generated each time orgmode Git is synced to Emacs
Bzr (it would be best to automate this).

Note that the internal functions (org-release) and (org-git-release)
are not autoloaded when org-version is not present and become only
available when org.el is loaded.  This should pose no problem since
they are only used by (org-version), which is autoloaded from org.el.
org-element: Silence byte-compiler
add hints for R testing

* default.mk: Add hints for what is required to test with ob-R enabled.
Makefile: add new target cleantesting

* targets.mk: Add new target 'cleantesting', remove remnants from testing/.
* Makefile: Document new target.
Makefile: fix whitespace error

* targets.mk: Fix whitespace error.
provide for .el files that should be installed, but not compiled

* lisp/Makefile: Add LISPN (empty by default) which is used to filter
  out files from LISPC.  This means that install will not fail due to
  a corresponding .elc missing.  This might become useful if lisp
  source files set "no-byte-compile: t" for whatever reason.
org-export: Allow anonymous functions in translate alists

* contrib/lisp/org-export.el (org-export-transcoder, org-export-data):
  Allow anonymous functions in translate alists.
* testing/lisp/test-org-export.el: Update tests.
org-e-odt.el: Refactor and rearrange
org-e-odt.el: Fix previous commit
org-export: Use `eq' instead of `equal' when possible

* contrib/lisp/org-export.el (org-export-data,
  org-export-footnote-first-reference-p,
  org-export-get-footnote-number, org-export-get-ordinal,
  org-export-get-loc, org-export-table-row-group,
  org-export-table-cell-starts-colgroup-p,
  org-export-table-cell-ends-colgroup-p,
  org-export-table-cell-address): Use `eq' instead of `equal' when
  possible.
* contrib/lisp/org-e-ascii.el (org-e-ascii-table-row):
* contrib/lisp/org-e-beamer.el (org-e-beamer-select-environment):
* contrib/lisp/org-e-html.el (org-e-html-footnote-section,
  org-e-html-latex-environment, org-e-html-paragraph): Use `eq'
  instead of `equal' when possible.
* contrib/lisp/org-e-latex.el (org-e-latex--get-footnote-counter):
* contrib/lisp/org-e-odt.el (org-e-odt-do-format-code,
  org-e-odt-footnote-def, org-e-odt-item, org-e-odt-latex-environment,
  org-e-odt-latex-fragment, org-e-odt-plain-list, org-e-odt-table,
  org-e-odt-enumerate-element): Use `eq' instead of `equal' when
  possible.

In particular, comparing elements shouldn't be done with `equal' since
they are circular lists.  On the other hand, using `eq' is fine if
they belong to the same tree.
org-e-ascii: Comment fix
org-e-ascii: Fix export of tables with a special column or a top-left corner

* contrib/lisp/org-e-ascii.el (org-e-ascii--table-cell-width,
  org-e-ascii-table-row): Fix export of tables with a special column
  or a top-left angle.
org-element: Normalize contents of elements in place

* contrib/lisp/org-element.el (org-element-normalize-contents):
  Normalize contents of elements in place.  This is required to be
  sure that a normalized element still is `eq' to its equivalent in
  the parse tree.
org-element: Fix error when parsing a line-break

* contrib/lisp/org-element.el (org-element-line-break-parser)
(org-element-line-break-interpreter): Line-break object ends where the
line ends.  It doesn't contain the next newline character.
(org-element-parse-objects): Refactoring.
org-element: Store parsed timestamps without the bracket markers

* contrib/lisp/org-element.el (org-element-planning-parser): Store
  parsed timestamps without the bracket markers.
(org-element-timestamp-interpreter): Store parsed timestamps without
  the bracket markers.  Also provide a new property: `:range-end'.
(org-element-planning-interpreter, org-element-timestamp-interpreter):
Apply changes to parsers.
* testing/lisp/test-org-element.el: Add test.
org-export: Adapt back-ends to timestamp object change

* contrib/lisp/org-e-ascii.el (org-e-ascii-timestamp): Use :range-end
  property when applicable.
* contrib/lisp/org-e-html.el (org-e-html-timestamp): Use :range-end
  property when applicable.
* contrib/lisp/org-e-latex.el (org-e-latex-timestamp): Use :range-end
  property when applicable.
* contrib/lisp/org-e-odt.el (org-e-odt-timestamp): Use :range-end
  property when applicable.