Implement support for __str__ and __repr__ special methods in classes.
unix: Clean up includes.

Remove unnecessary includes. Add includes that improve portability.
py: Clean up includes.

Remove unnecessary includes. Add includes that improve portability.