Improve python library determinism.

1) Make the core python libraries deterministic.
2) Make the python libraries created by glib deterministic.