tests: fix DateTime.isPast() under pinDateTime

When under a pinDateTime context, d.isPast() was comparing d with the
actual current date, not the fake date from the pinned context.

Also, make the methods class methods, so that they can be used as
external methods in Zelenium tests.
6 jobs for fix/pinDateTime in 0 seconds
Status Job ID Name Coverage
  External
failed ERP5.CodingStyleTest-TestRunner2

02:30:59

failed ERP5.UnitTest-TestRunner2

03:33:39

failed ERP5.CodingStyleTest-TestRunner2

03:39:18

failed ERP5.CodingStyleTest-TestRunner2

01:50:29

failed ERP5.UnitTest-TestRunner2

04:11:15

passed ERP5.UnitTest-TestRunner2

02:33:56