Fix and improve setting priority of todo-mode items (bug#64433)
* lisp/calendar/todo-mode.el (todo-set-item-priority): Bugfixes:
Prevent interactively setting item priority to its current
priority in the same category and prompt user for a different
priority (but allow using the same priority when item is moved to
another category). Ensure that the priority passed as a prefix
argument is suitable: if it is not an integer between 1 and the
highest item number, signal a user error. New feature: Use the
sequence of numbers of the category's items as the minibuffer
history.
* doc/misc/todo-mode.texi (Inserting New Items):
(Reprioritizing Items): Document using the minibuffer history.
* test/lisp/calendar/todo-mode-tests.el
(todo-test-item-insertion-with-priority-1)
(todo-test-item-insertion-with-priority-2)
(todo-test-item-insertion-with-priority-3): New tests.