python interface: only export __str__ and __repr__ if *_to_str is declared
Instead of plainly assuming to_str always exists, we now only export
__str__ and __repr__ in case *_to_str is declared in the public header
files. At this point all exported classes have a *_to_str function, but
ast_build does not have _to_str and there are no concrete plans to add
such an interface. To still be able to generate types for classes
without *_to_str, we remove the dependency on its existence.
Signed-off-by: Tobias Grosser <tobias@grosser.es>
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>