python: improve library determinism

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

@vcunat put back the removal of share/gtk-doc in glib.