hwc: add support for unified safe mode

- Add APIs to ensure minimum resources allocated for
  the new display registered/display coming out of OFF state.
- Add checks to make sure that the allocated resources
  are freed by other active displays, if needed, before
  notifying client that the display is ready to accept
  content.

Change-Id: Idc3fabb697a63956ef606d7f87495510d58ed32c
CRs-fixed: 2532431
16 files changed