Fix Poppler Checkbox bugs
This MR is a set of 3 commits to fix different Form Checkbox bugs on Poppler:
1st commit (Fixes #642 Improves #1055):
When loading standalone Formfields, we were wrongly
creating new AnnotWidgets to fill its FormWidget member,
whereas we just needed to set it to the own AnnotWidget
that contains the standalone field.
That meant that when clicking on standalone checkbox
fields we were really clicking on AnnotWidgets that
were not the ones used for drawing the page.
With this fix those checkboxes now work ok.
Fixes #642
Improves #1055
2nd commit (Fixes #1558):
When the Normal Appearance Stream (/AP -> /N) is a Ref,
we previously assumed it could only be a Ref to Stream,
but it can also be a Ref to Dict of named streams, so we
need to add that logic in AnnotAppearance::getAppearanceStream()
Fixes checkbox field in below referenced issue.
Fixes #1558
3rd commit (Fixes #1055 when used together with first commit):
Spec says DA entry is required "to all fields
containing variable text" but it seems checkbox
fields are de-facto not considered as such.
Handle that in AnnotAppearanceBuilder::drawText()
Fixes #1055 (when used together with the fix in #642)