Sphinx: better handle duplicate module- element IDs
Sphinx: better handle duplicate module- element IDs

Sphinx allows for specifying a module (using ".. py:module::") multiple
times. Even though it results in a severe error, this broke the outline
creation in the PDF backend.

Moving the these module- IDs to the end of the list makes sure they are
not used as the primary ID (if the element has other IDs).

brechtm/rinohtype,brechtm/rinohtype,brechtm/rinohtype