Fix a hard-to-trigger bug:
If a weak pointer is assigned twice to young objects between two minor
collections, then this pointer is unduly erased at the next minor GC.
This bug makes the typechecker fail on the pxp source (as found in the
OPAM package).

Also fix the minor collection counter.