Enhance ::findText() to support matching across lines

by adding 5 new parameters to it (4 to return coords
for the part of the match that falls on the next line
and 1 to specify whether hyphen was ignored at end of
first line).

Backwards compatibility is kept on the poppler side, but
the bindings (glib, qt5, etc) would need a new function
and a new return type to implement fully this feature, as
their current api use a data type that contains only match
coords (QRectF for qt5, PopplerRectangle for glib) while
this feature needs to pass information on whether the hyphen
was ignored at end of line (1 extra boolean field) and
whether the returned rectangle is the first or second part
of an across-line match (1 extra boolean field).

This commit implements the aforementioned new api required
for the glib binding, by adding new flag POPPLER_FIND_ACROSS_LINES
and the following new function:

GList *
poppler_page_find_text_with_options2 (PopplerPage     *page,
                                      const char      *text,
                                      PopplerFindFlags options);

where the returned GList contains new type PopplerFindRectangle
which is defined as:

struct _PopplerFindRectangle {
  gdouble x1;
  gdouble y1;
  gdouble x2;
  gdouble y2;
  gboolean next_line; /* Whether this rectangle represents the
                       * second part of a match happening across
                       * two lines (i.e. the part that happens on
                       * the second/next line). */

  gboolean after_hyphen; /* Whether hyphen was present and ignored
                          * at the end of first line. Only set
                          * when 'next_line' field is also true. */
};

For Qt5 binding, this commit only implements the new flag
Poppler::Page::AcrossLines (but no new function and no new
return data type) and if this flag is passed, the returned
list of rectangles will also include rectangles for the
second part of across-line matches.

This minimum qt5 binding still allows for the creation of
tests for this feature (using the qt5 test framework) which
this commit *do includes*. But a more complete binding (with
a new return type that includes 'next_line' and 'after_hyphen'
boolean fields) is left to do for qt5 binding maintainers
if they want to use this feature (in eg. Okular).

So, as mentioned, this commit incorporates tests for the
implemented across-line matching feature, and the tests do
also check for two included aspects of this feature, which are:

 - Ignoring hyphen character while matching when 1) it's the
   last character of the line and 2) its corresponding matching
   character in the search term is not an hyphen too.

 - Any whitespace characters in the search term will be allowed
   to match on the logic position where the lines split (i.e. what
   would normally be the newline character in a text file, but
   PDF text does not include newline characters between lines).

Regarding the enhancement to findText() function which implements
matching across lines, just two more notes:

 - It won't match on text spanning more than two lines, i.e. it
   only matches text spanning from end of one line to start of
   next line.

 - It does not supports finding backwards, if findText() receives
   both <backward> and <matchAcrossLines> parameters as true, it
   will ignore the <matchAcrossLines> parameter. Implementing
   <matchAcrossLines> with backwards direction is possible, but
   it will make an already complex function like findText() to be
   even more complex, for little gain as eg. Evince does not even
   use the <backward> parameter of findText().

Fixes poppler issues #744 and #755
Related Evince issue https://gitlab.gnome.org/GNOME/evince/issues/333
6 jobs for BUG_search_across_lines in 7 minutes and 2 seconds (queued for 2 seconds)
Status Job ID Name Coverage
  Build
failed #273099
build

00:07:02

passed #273104
build_android

00:01:31

failed #273100
build_clang_libcpp

00:07:01

failed #273103
build_clazy

00:02:52

passed #273102
build_mingw64_fedora

00:03:48

passed #273101
build_ubuntu_16_04

00:01:34

 
Name Stage Failure
failed
build Build

95% tests passed, 1 tests failed out of 21

Total Test time (real) = 1.44 sec

The following tests FAILED:
13 - check_qt5_search (Child aborted)
Errors while running CTest
ERROR: Job failed: exit code 1
failed
build_clang_libcpp Build

95% tests passed, 1 tests failed out of 21

Total Test time (real) = 1.57 sec

The following tests FAILED:
13 - check_qt5_search (Child aborted)
Errors while running CTest
ERROR: Job failed: exit code 1
failed
build_clazy Build
1 error generated.
[412/421] Linking CXX executable qt5/tests/check_qt5_annotations
[413/421] Linking CXX executable qt5/tests/check_qt5_metadata
[414/421] Linking CXX executable qt5/tests/check_qt5_fonts
[415/421] Building CXX object qt5/tests/CMakeFiles/check_qt5_pagelabelinfo.dir/check_pagelabelinfo.cpp.o
[416/421] Building CXX object qt5/tests/CMakeFiles/check_qt5_strings.dir/check_strings.cpp.o
[417/421] Building CXX object qt5/tests/CMakeFiles/check_qt5_optcontent.dir/check_optcontent.cpp.o
ninja: build stopped: subcommand failed.
ERROR: Job failed: exit code 1