hwc: Clean up ExternalDisplay class

1. Remove hwc_context_t from libexternal since this is a construct
   that should only be used in libhwcomposer.
2. Clean up redundant code by creating utility functions to
   a. open a sysfs node in a given mode
   b. improving EDID mode storage/manipulation
   c. creating/destroying composition objects
3. Add utility functions to
   a. get the connected state of the external display
   b. determine which interface the external display is connected to
      (primary or external)
   c. activate the hdmi interface by setting the resolution via an
      ioctl
   d. update/reset external display information when a device
      connected/disconnected

Change-Id: Iba34c9e43b39ccb9c9436deb726587bd1b26b779
7 files changed