[ozone/wayland] Add a helper function to WaylandDataDevice to read the data from FD

It moves the code to read the data from FD to 'ReadDataFromFD' in
WaylandDataDevice to reuse it for drag-and-drop, as WaylandDataDevice
is the class to handle not only copy-and-paste but drag-and-drop and
drag-and-drop needs to read the data from FD as well.

It doesn't bring behavioral changes.

Bug: 578890, 875164
Change-Id: I460ab9df2b4d32bbdb0e71c753cb19c572df12ab
Reviewed-on: https://chromium-review.googlesource.com/1179505
Reviewed-by: Maksim Sisov <msisov@igalia.com>
Reviewed-by: Antonio Gomes <tonikitoo@igalia.com>
Commit-Queue: Julie Jeongeun Kim <jkim@igalia.com>
Cr-Commit-Position: refs/heads/master@{#584047}
2 files changed