pdf: Reset the annotation mapping when there are no more annotations

https://bugzilla.gnome.org/show_bug.cgi?id=649044
page-cache: Add flags parameter to ev_page_cache_mark_dirty()

This allows to specify what is dirty so that it's freed before being
cached again.