pdfium: Fix all -Wdelete-non-virtual-dtor violations on Mac.

Calling `delete` on an object of a type that has virtual functions but
not a virtual destructor is questionable: Since the object has virtual functions,
it likely has subclasses, so if it's deleted through the base pointer and the
destructor isn't virtual, the subclass destructor won't be called.

In most cases, the classes getting deleted can just be marked final to tell
the compiler that it can't possibly have subclasses (this also enables the
compiler to generate better code).

Two classes didn't have any sub- or superclasses but virtual functions -
this doesn't make sense, so make all methods of these classes non-virtual.
(Also delete an unused function on one of the two classes.)

In one case, a class actually did have a subclass that needs to be deleted
virtually, so mark one destructor as virtual.

BUG=none
R=bo_xu@foxitsoftware.com

Review URL: https://codereview.chromium.org/370853002
Fix pdfium building issue on VS2010

BUG=pdfium_23
R=palmer@chromium.org

Review URL: https://codereview.chromium.org/399233002
Fix bounds checking in CJS_PublicMethods::MakeRegularDate().

The function is looking ahead N characters at both its "format" and "value"
strings without validating that accesses are in bounds.  Add those validations.

There are also duplicate checks in the else-branches which re-test the inverse
of the if-branch.  These are removed for simplicity.

I also tidied some stray whitespace in the function while I was at it.

BUG=393831
R=jun_fang@foxitsoftware.com

Review URL: https://codereview.chromium.org/395303004
Fix the potential integer overflow from "offset + size".

BUG=382667
R=jschuh@chromium.org, jun_fang@foxitsoftware.com

Review URL: https://codereview.chromium.org/390983007
Build with exceptions enabled on Windows too.

This should be set consistently on all platforms. Ideally, we wouldn't
need exceptions, but for now they're used.

BUG=none (noticed while looking at chromium:82385)
R=jam@chromium.org

Review URL: https://codereview.chromium.org/404803005
Fix remaining -Wdelete-non-virtual-dtor violations on Windows.

Follow-up to https://codereview.chromium.org/370853002/

BUG=none
R=bo_xu@foxitsoftware.com

Review URL: https://codereview.chromium.org/406683005
Adjust null object check

BUG=None
R=thakis@chromium.org

Review URL: https://codereview.chromium.org/396173003
Added options to save pages into BMP and EMF on Windows.

BUG=179413
R=bo_xu@foxitsoftware.com

Review URL: https://codereview.chromium.org/408403002
Fix FPDF_RenderPage 2x zoom in when bBackgroundAlphaNeeded is true

BUG=179413
R=thestig@chromium.org

Review URL: https://codereview.chromium.org/410073002
Fix lookahead beyond bounds in CJS_PublicMethods::MakeFormatDate().

BUG=396255
R=jun_fang@foxitsoftware.com

Review URL: https://codereview.chromium.org/407243003
Fix potential memory violation in CJS_PublicMethods::StrRTrim()

BUG=395266
R=jun_fang@foxitsoftware.com

Review URL: https://codereview.chromium.org/411713003
Only use "final" on MSVS2012+, to keep pdfium building with 2010.

BUG=pdfium:26
TBR=bo_xu@foxitsoftware.com

Review URL: https://codereview.chromium.org/418463002
Remove unnecessary aligned memory check when __SSE__ is used

Since the land of https://pdfium.googlesource.com/pdfium/+/3522876d5291922ddc62bf1b70d02743b0850673, memory is assured to be 16 byte aligned. So no need to do this check.

Plus, the removed code was causing bug in M36: https://code.google.com/p/pdfium/issues/detail?id=27.

BUG=None
R=thestig@chromium.org

Review URL: https://codereview.chromium.org/418563002
Check for integer overflow in CFX_BasicArray.

BUG=384662
R=bo_xu@foxitsoftware.com, rsesek@chromium.org

Review URL: https://codereview.chromium.org/411033003
Refactor CFX_BasicArray.

The |nGrowBy| argument to |SetSize| was always -1, which caused the
effective m_nGrowBy value to always be its default value: 0. So it was not
needed, and was cluttering up the logic.

BUG=384662

Check for integer overflow in CFX_BasicArray.

BUG=384662
R=bo_xu@foxitsoftware.com, rsesek@chromium.org

Review URL: https://codereview.chromium.org/415803002
change for pdfium.js
new api