[OCaml][DebugInfo] Add tests for debug info API

Authored by vaivaswatha on Mar 26 2021, 9:36 AM.


[OCaml][DebugInfo] Add tests for debug info API

In the process of adding the tests, several bugs were
found in the implementation and interface of the API
and they were fixed.

Some utilities from the core tests (core.ml) were moved
into a separate file for reuse.

The following new functions have been added:
dibuild_create_constant_value_expression and
llmetadata_null. The third one already existed but
is now exposed publicly.

Differential Revision: https://reviews.llvm.org/D99403