Distill generic part from error monad
Context
This MR separates the different components of the error monad into generic ones (that do not use a hard-coded error type) and the specilaised ones (that use the extensible type error = ..). These changes are propagated to Lwtreslib too.
The long-term goal is (1) cleaner code, (2) being able to use the power of the error monad for either the built-in error type or for more local errors. This MR is one step in this direction. See !1872 (closed) for other MRs that take other steps in the same direction.
Reviewers
Edited by Raphaël Proust