Closes #3321 (closed)
Rewrites some code to use the Lwt_syntax_option syntax module.
Lwt_syntax_option