[llvm-c] Expose getGlobalValueAddress, getFunctionAddress

Summary:
The OCaml bindings use getPointerToGlobal as the primary way to get a
handle on functions to run. This function is broken and deprecated, and
we want to transition to the modern getFunctionAddress alternative. This
is a two step process: first, there needs to be a C wrapper that OCaml
can leverage. So, build LLVMGetFunctionAddress with a test. While at it,
also build a LLVMGetGlobalValueAddress.

Second, there needs to be an OCaml interface to the new C
functions. This will be done in another patch.

Reviewers: whitequark

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D6760
[OCaml] Build a wrapper for LLVMGetFunctionAddress

Summary:
I've verified that the LLVMGetFunctionAddress is receiving the right
string, and calling down to the MCJIT implementation of
getFunctionAddress. However, getSymbolAddress does not seem to want to
cooperate with us, and returns 0 for a perfectly valid function. Why
LLVMGetFunctionAddress works via the C API, but not via the OCaml API
after having verified that the arguments are right stumps me.

Perhaps there is some name mangling going on when OCaml emits the IR? I
can't imagine why, but it's the only explanation I've been able to reach
so far.

Reviewers: whitequark

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D6761