store invalid_type_encoder directly in lua registry
add support for speicalized cyclic reference encoding