ni: adds global references to Nit objects from C code
Allows to preserve a reference during program execution. It is valid
no matter the extern method invoked.
Uses a global list to preserve all references explicitly asked to be
kept in the program. The user must call Object_incr_ref( Object obj )
to increment the reference count of obj. If it's reference count was
at 0, then it will be added to the global list.
The same Nit object may be present multiple times in the global list.
Only reference incrementation on the same C structure represernting
the object will increment the same counter.
This algorithm allows for fast increment, no matter how many global
references are already registered.
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>