Rework type-directed completion
Rework type-directed completion

Factor out Variants and type-checking for values and constructors

rgrinberg/merlin,the-lambda-church/merlin,rgrinberg/merlin,chriskonstad/merlin,the-lambda-church/merlin,neojski/merlin,dra27/merlin,chriskonstad/merlin,neojski/merlin,chambart/merlin,ocaml/merlin,fxfactorial/merlin,ocaml/merlin,haselwarter/merlin,ocaml/merlin,dra27/merlin,fxfactorial/merlin,dra27/merlin,haselwarter/merlin,ocaml/merlin,haselwarter/merlin,the-lambda-church/merlin,rgrinberg/merlin,neojski/merlin,haselwarter/merlin,fxfactorial/merlin,chambart/merlin,fxfactorial/merlin,neojski/merlin,dra27/merlin,chambart/merlin,chambart/merlin,rgrinberg/merlin