Fix various Calc date conversions (bug#36822)

* lisp/calc/calc-forms.el (math-absolute-from-gregorian-dt):
Rewrite in a way that I understand, and that actually seems to work.
(math-absolute-from-julian-dt): Use Julian, not Gregorian, leap year
rules for counting days within a year.
(math-julian-date-beginning, math-julian-date-beginning-int):
Change constants to be consistent with their doc strings and the code:
use Rata Die epoch at Dec 31, 1 BC Gregorian proleptic, not Julian.
* doc/misc/calc.texi (Date Forms): Correct difference between Julian
Day and Rata Die.
* test/lisp/calc/calc-tests.el (calc-test-calendar): New test.
1 job for master in 55 minutes and 56 seconds (queued for 2 seconds)
Status Job ID Name Coverage
  Test
failed #2914
test-all

00:55:56

 
Name Stage Failure
failed
test-all Test
Makefile:318: recipe for target 'check-doit' failed
make[2]: Leaving directory '/builds/emacs/emacs/test'
make[2]: *** [check-doit] Error 2
Makefile:293: recipe for target 'check-expensive' failed
make[1]: *** [check-expensive] Error 2
make[1]: Leaving directory '/builds/emacs/emacs/test'
Makefile:959: recipe for target 'check-expensive' failed
make: *** [check-expensive] Error 2
ERROR: Job failed: exit code 1