[OCaml] Fix incorrect use of CAMLlocal in nested blocks
The OCaml manual states:
Local variables of type value must be declared with one of the
CAMLlocal macros. [...] These macros must be used at the beginning
of the function, not in a nested block.
This patch moves several instances of CAMLlocal macros from nested
blocks to the function beginning.
Reviewed By: whitequark
Subscribers: CodaFi, llvm-commits
Differential Revision: https://reviews.llvm.org/D53841