unix: Clean up includes.

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

Remove unnecessary includes. Add includes that improve portability.