erlang: switch to use process dictionary instead of ETS
removed unused extern
add C++ implementation