Fix some monkey-patches to make them compatible with ZODB5

See also https://github.com/zopefoundation/ZEO/pull/63
     and !1095

No error in testCMFActivity and testConflictResolution.
For the only error in testInvalidationBug, see comment.

But this commit is not enough for ZODB5. The only known issue so far
is the use of newer pickle protocol, which breaks export of ZODB data
and requires non-trivial changes in our XMLExportImport/ppml code.
So for the moment, many failures in testBusinessTempate.
6 jobs for master in 0 seconds
Status Job ID Name Coverage
  External
failed ERP5.CodingStyleTest-Master

01:13:28

passed ERP5.PerformanceTest-Master

00:23:19

failed ERP5.UnitTest-Master

01:58:17

failed ERP5.UnitTest-Master.Medusa

02:08:36

passed SlapOS.Eggs.UnitTest-Master.Python2

00:28:49

passed SlapOS.Eggs.UnitTest-Master.Python3

00:10:58