Make [Memo.State.Running_*] typed (#2988)
Make [Memo.State.Running_*] typed (#2988)

This eliminates a couple of [assert false] in impossible branches.

Apparently, GADTs didn't play well with OR patterns in OCaml 4.07
(see https://github.com/ocaml/ocaml/pull/2110), so I had to tweak
some pattern matches to make this pass CI.

Signed-off-by: Andrey Mokhov <251bbb147316c69f1038239e09718efe08bbf2d1@janestreet.com>

dra27/jbuilder,dra27/jbuilder,janestreet/jbuilder,janestreet/jbuilder,dra27/jbuilder,janestreet/jbuilder,dra27/jbuilder,dra27/jbuilder,janestreet/jbuilder,janestreet/jbuilder,janestreet/jbuilder,dra27/jbuilder