Revert "org-compat.el: New compatibility function `org-random'"

This reverts commit 7719734dd7b216e29ee7f5be5077d13004903a7d.

* lisp/org-id.el: Do not use (random t), we just want a new random
  number, not a re-seeding of the PRNG for which (random t) doesn't
  provide enough entropy anyway.  Even if (random) would always
  produce the same sequence, the other components going into the MD5
  hash ensure that the result will be unique.
Merge branch 'maint'
org-agenda.el (org-agenda-bulk-action): Fix bug when bulk-shifting timestamps.

* org-agenda.el (org-agenda-bulk-action): Fix bug when
bulk-shifting timestamps.

Thanks to Rainer Stengele for reporting this.
Merge branch 'maint'
org.texi: Mention Calc defmath

* org.texi (Formula syntax for Calc): Add a sentence to mention Calc
defmath.
org-agenda.el: Allow a new specifier `%l' in `org-agenda-prefix-format'

* org-agenda.el (org-agenda-prefix-format): A new specifier
`%l' allows to insert X spaces when the item is of level X.
(org-search-view, org-get-entries-from-diary)
(org-agenda-get-todos, org-agenda-get-timestamps)
(org-agenda-get-sexps, org-agenda-get-progress)
(org-agenda-get-deadlines, org-agenda-get-scheduled)
(org-agenda-get-blocks, org-agenda-change-all-lines): Add a
new text property 'level, a string with as many whitespaces as
the level of the item.
(org-agenda-format-item, org-compile-prefix-format): Handle
the new `%l' specifier.

This new specifier allows to have a visual clue about the level
of the item in agenda views.
* org-e-latex.el (org-e-latex-export-block): Fix typo.

* org-e-latex.el (org-e-latex-export-block): Fix typo.

TINYCHANGE
org.el: Option to get LaTeX preview in the same color as text face

* org.el (org-format-latex-options): Add `auto' to docstring.
(org-format-latex): Get face colors at point and put them inside opt.
(org-create-formula-image-with-dvipng): Fix bug when colors are not
`default'.
(org-create-formula-image-with-imagemagick): Fix bug when handling
"Transparent" bg color.
(org-dvipng-color-format): Same as `org-latex-color-format' for
dvipng-style color specification.

If `auto' is used for the :foreground or :background value in
org-format-latex-options, the the appropriate color is chosen
from the face in which the formula is displayed.
org-element: Fix parsing for items/footnote definitions starting with special syntax

* lisp/org-element.el (org-element--current-element): At the very
  beginning of a footnote definition or an item, next element is
  always a paragraph.
* testing/lisp/test-org-element.el: Add tests.

This patch fixes parsing for following cases:

 - - text

or

[fn:1] # Some text
Fix previous commit.

Thanks to Rainer Stengele for reporting a related problem.
Merge branch 'maint'
fix typo in support of sidewaystables in the new latex exporter

* contrib/lisp/org-e-latex.el (org-e-latex-table--org-table): Typo.
  sidewaystables -> sidewaystable.
Merge branch 'maint' of orgmode.org:org-mode into maint
Merge branch 'maint'
Merge branch 'master' of orgmode.org:org-mode
Fix commit b508ff69 again.
org-e-latex: Allow to customize table of contents command

* contrib/lisp/org-e-latex.el (org-e-latex-toc-command): New variable.
(org-e-latex-template): Use new variable.

Thanks to Thomas S. Dye for providing the patch.
Rewrite Babel pre-processing functions

* lisp/ob-exp.el (org-babel-exp-src-block): Remove unused argument.
(org-babel-exp-non-block-elements): Rewrite function using Org Element.
* lisp/org-exp-blocks.el (org-export-blocks-preprocess): Rewrite
  function using Org Element.
Remove org-export-blocks.el

* lisp/org-exp-blocks.el: Delete file.
* lisp/ob-exp.el (org-export-blocks-preprocess): Moved from
  "org-export-blocks.el".
* lisp/ob-ditaa.el (org-ditaa-jar-path): Moved from
  "org-export-blocks.el".
ob-exp: Improve `org-export-blocks-preprocess'

* lisp/ob-exp.el (org-export-blocks-preprocess): Improve blank lines
  handling in function. Add comments. Remove
  `org-export-blocks-postblock-hook' since it's defined nowhere
  now (and doesn't need to, there's `org-export-before-parsing-hook'
  already).