RFC: add `finalize` function

Should be self-explanatory.
needs explicit cast for msvc / compiling in C++ mode `int ok = finalize_object((jl_value_t*) o);`

otherwise, do want. :+1: