Warn users of malformed property drawers

* org.el (org-buffer-property-keys): When scanning the buffer for
valid property keys, give users a chance to repair any malformed
property drawers.
org.el (org-cycle-internal-local): Fix trailing character bug

* org.el (org-cycle-internal-local): Don't show a trailing
character when cycling a subtree that ends with a non-newline
character at the end of the buffer or the narrowed region.
org.el: Don't advise `outline-end-of-subtree'

* org.el (org-move-subtree-down): Use `org-end-of-subtree'
instead of `outline-end-of-subtree'.
(outline-end-of-subtree): Remove advice.

* org-mouse.el (org-mouse-move-tree, org-mouse-do-remotely):
Use `org-end-of-subtree' instead of `outline-end-of-subtree'.
Merge branch 'maint'
org-agenda.el (org-agenda-remove-filter): Use `save-excursion'

* org-agenda.el (org-agenda-remove-filter): Use `save-excursion'.
Merge branch 'maint'
org-capture.el (org-capture-steal-local-variables): Don't steal `mark-active'

* org-capture.el (org-capture-steal-local-variables): Don't
steal `mark-active', which should be nil in the target buffer.

Thanks to Alex Kosorukoff for raising this issue.
Merge branch 'maint'
org.el: Implement agenda sorting against stats cookies.  Code cleanup

* org.el (org-refresh-category-properties): Don't put the
'org-category-position property.
(org-refresh-stats-properties): New function.
(org-agenda-ignore-properties): Rename from
`org-agenda-ignore-drawer-properties', which is now obsolete.
Allow to use 'stats.
(org-agenda-prepare-buffers): Check stats properties.
(org-get-at-bol): Make a defsubst.
(org-get-at-eol): New function.

* org-agenda.el (org-entries-lessp): Sort by statistic
cookies.
(org-search-view, 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): Don't set
the 'org-category and 'org-category-pos text properties.
'org-category-pos is useless and 'org-category is set through
`org-agenda-format-item'.
(org-agenda-format-item): Remove useless code.
(org-cmp-priority): Delete.
(org-cmp-values): New function to compare text properties
values.
(org-cmp-effort, org-agenda-to-appt): Check against the end of
the line.
(org-agenda-filter-by-category, org-agenda-filter-apply)
(org-agenda-change-all-lines): Use `org-get-at-eol'.
org-agenda.el (org-agenda-format-item): Don't add the 'effort and 'effort-minutes text properties

* org-agenda.el (org-agenda-format-item): Don't add the
'effort and 'effort-minutes text properties as they are
already accessible through the 'txt property of agenda lines.

* org-clock.el (org-clock-in): Refresh both the 'effort and
'effort-minutes text properties.

* org-rmail.el (rmail, rmail-file-name): Silent byte-compiler.

* org.el (org-refresh-properties): Allow to set several text
properties by passing an alist to the TPROP argument.
(org-set-effort, org-property-next-allowed-value): Use 'effort
instead of 'org-effort.
(org-agenda-prepare-buffers): Update both 'effort and
'effort-minutes.
(org-mark-jump-unhide): Move up to silent the byte-compiler.
Revert "org-capture.el (org-capture-steal-local-variables): Don't steal `mark-active'"

This reverts commit ee5a88cd01cccc7b12422aebe6269bfeb444d387.
org-capture.el (org-capture-fill-template): Set `mark-active' to nil

* org-capture.el (org-capture-fill-template): Set
`mark-active' to nil.

TINYCHANGE
Merge branch 'maint'
org.el (org-refresh-stats-properties): Fix arithmetic error

* org.el (org-refresh-stats-properties): Fix arithmetic error.

Thanks to Gregor Zattler for reporting this.
org.el (org-refile-check-position): Remove unused user error

* org.el (org-refile-check-position): Remove unused user error.
Minor reformatting
org.texi (Global and local cycling): Fix ref

* org.texi (Global and local cycling): Use only @pxref{}, as
Texinfo will take care of referring to the correct Emacs
manual HTML location.
htmlxref.cnf: New file to let texi2html point at the correct Calc HTML manual
org-timer.el (org-timer-value-string): Always return a positive value

* org-timer.el (org-timer-value-string): Always return a
positive value.  Add docstring.
Merge branch 'maint'