replace fromMLstring with string_to_inner

and some other minor changes
implement typesem_cert, but had to change base_types_of_type