glib: Use flags argument in poppler_structure_element_get_text()

Instead of accepting a boolean argument to enable recursive text extraction,
use a flags value. Text extraction may add features in the future (for
example, allowing using alternate text as replacement for inline figures),
and this will allow to extend the method without introducing ABI or API
breakage.

https://bugs.freedesktop.org/show_bug.cgi?id=75796