[ASDL cleanup] Add type annotations to gen_cpp.py