drm_hwcomposer: Improve Mapper@4 metadata API fds index guessing logic

Unfortunately Mapper@4.0 metadata API doesn't allow to query fd index or
getting fd another way for every layout plane, therefore users have to
provide their custom additional metadata API.

We are doing all our best to minimize custom per-platform logic in
drm_hwcomposer. So it was decided to implement primitive guessing logic,
allowing users to extend it with out-of-tree code if necessary.

As was reported by John Stultz in [1] our primitive logic has some flaws.

New guessing logic are using inputs from layout data (offsets, sizes),
and should be more precise.

[1]: drm-hwcomposer/drm-hwcomposer!159
Signed-off-by: Roman Stratiienko <roman.o.stratiienko@globallogic.com>
4 jobs for improve-mapper4-fds-guessing-logic in 5 minutes and 46 seconds (queued for 2 seconds)