Returns optional values from any AXNode related API that might fail and drops the use of int32_t from countable arguments

1. Certain APIs exposed by AXPlatformNodeDelegate, AXPlatformNode and automation might fail.
For example, asking for the number of rows when not inside a table object, or asking for the PosInSet of an object that is not part of a set.
2. Certain APIs do not conform to our C++ Style Guide by exposing int32_t arguments and thereby
infect the whole codebase that uses them.

This patch uses base::Optional as the return type of any API that might fail and
removes the use of int32_t from any API arguments that refer to something countable, e.g. a row_index or a set_size.
Intentionally, we don't remove the use of int32_t for representing AXNode IDs, because
node IDs should be treated as an opaque data type and no numeric calculations should be performed on them.

This patch has uncovered some bugs in the IAccessible2 table implementation, which have been fixed.
Specifically, if a row or column argument is out of range, E_INVALIDARG should be returned from get_columnExtents, get_rowExtents, get_rowDescription and get_columnDescription, instead of S_FALSE.
Also, get_rowDescription and get_columnDescription should return the header cell if called on a header cell.

R=dtseng@chromium.org, aleventhal@chromium.org

Change-Id: I58d4ca2bec8b245795b8e8bea2e7261786acdb35
Bug: 953443
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1600942
Commit-Queue: Nektarios Paisios <nektar@chromium.org>
Reviewed-by: Nektarios Paisios <nektar@chromium.org>
Reviewed-by: Aaron Leventhal <aleventhal@chromium.org>
Reviewed-by: David Tseng <dtseng@chromium.org>
Reviewed-by: Kevin Babbitt <kbabbitt@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#668198}
45 files changed