Kill optional_call and emval has_function: they are legacy from the old way of deriving from C++ virtual classes
remove some TODOs and commented-out test code