Text widget annotations: implement maximum length and text alignment
Text widget annotations: implement maximum length and text alignment

Moreover, we refactor the code a bit to extract code that is shared
between the two branches and we only apply text alignment (and create
the array) when it is actually defined, since it's optional and left is
already the default.

yurydelendik/pdf.js,tinderboxhq/pdf.js,skalnik/pdf.js,ydfzgyj/pdf.js,nawawi/pdf.js,xavier114fch/pdf.js,showpad/mozilla-pdf.js,Snuffleupagus/pdf.js,mysterlune/pdf.js,adlerweb/pdf.js-Touch,macroplant/pdf.js,caremerge/pdf.js,timvandermeij/pdf.js,1and1/pdf.js,yurydelendik/pdf.js,WhitesteinTechnologies/wt-vaadin-pdf.js,Shoobx/pdf.js,Rob--W/pdf.js,adlerweb/pdf.js-Touch,Snuffleupagus/pdf.js,timvandermeij/pdf.js,caremerge/pdf.js,jasonjensen/pdf.js,websirnik/pdf.js,timvandermeij/pdf.js,1and1/pdf.js,websirnik/pdf.js,Rob--W/pdf.js,jasonjensen/pdf.js,mysterlune/pdf.js,ydfzgyj/pdf.js,mozilla/pdf.js,skalnik/pdf.js,tinderboxhq/pdf.js,mozilla/pdf.js,Shoobx/pdf.js,macroplant/pdf.js,mainegreen/pdf.js,a0preetham/pdf.js,WhitesteinTechnologies/wt-vaadin-pdf.js,mozilla/pdf.js,mukulmishra18/pdf.js,showpad/mozilla-pdf.js,nawawi/pdf.js,showpad/mozilla-pdf.js,mainegreen/pdf.js,macroplant/pdf.js,Shoobx/pdf.js,xavier114fch/pdf.js,a0preetham/pdf.js,nawawi/pdf.js,mukulmishra18/pdf.js,Snuffleupagus/pdf.js