hwc2: Add input validation and bound checks.

- Validate the input parameters to hwc2 and check if they
  are with in the allowed bounds.
- On the getter functions check the out counts before populating
  with output parameters

Change-Id: Ifd41aa4d4a0b08e521fabfe54f308a59622d109c
Crs-fixed: 2114346
3 files changed