fix named dest handling
(A reminder to adapt evince to poppler#631.)
As per poppler changes, named dests are byte strings of undefined encoding (and may contain 0 bytes unless they are in the new poppler escaped format).
There are a few places inside evince where named dests are handled incorrectly:
In ev-application.c:
case EV_LINK_DEST_TYPE_NAMED:
g_variant_builder_add (&builder, "{sv}", "named-dest",
g_variant_new_string (ev_link_dest_get_named_dest (data->dest)));
named dests are not strings, so this must not use string variants (which require valid UTF-8), but g_variant_new_bytestring instead. And the place where this is deserialised needs to be adapted accordingly.
In main.c:
{ "named-dest", 'n', 0, G_OPTION_ARG_STRING, &ev_named_dest, N_("Named destination to display."), N_("DEST")},
Needs to use G_OPTION_ARG_FILENAME instead (and maybe validate it's escaped according to the poppler format).
Also (wherever this is handled), when passing the named dest as a URI fragment, need to make sure to handle this as bytestring (and unescape %00) and escape to poppler format, before using the named dest.