Cleanup: Combine context managers and get it out of function

There is no need to have three separate context managers here. Also
putting it out of the function will allow further reuse and shortens
the function incresing code readability.
Several cleanups

These are meant to increase code readability and provide useful docstrings.
Requirements: Match Pootle Sphinx requirement
Cleanup: Remove intermediate _retrieve_placeables function

This way it is easier to understand the code.
tools/pretranslate: Remove dependency on xliff (and therefore lxml)

Fixes #1909