Backport dose patch for upgrade bug and sync patches to dose git

Thanks @abate and @rdicosmo.
Closes #1104

Also cleans up patching process: I now maintain a dose git branch to generate a cleaner stream of patches.

This allows to rebuild the branch from dose git using
```
git checkout 3.1.2
git am ../opam/src_ext/patches/dose/*.patch
```

The other way around, synching the patches on the opam repo from the 3.1.2-opam branch of dose can be done with:
```
cd opam; git rm -f src_ext/patches/dose/*
cd ../dose; git format-patch 3.1.2..3.1.2-opam -o ../opam/src_ext/patches/dose
cd ../opam; git add src_ext/patches/dose
```

patches
Ensure that internal heuristics are correctly called if external solvers are interrupted.
Cleanup the int/ext invocations of the solver

and avoid cross-invocations of the external solver from OpamHeuristic that are bound to fail
Remove obsolete comment
Add some build instructions in the README