hwc: NULL check on buffer handle

In some cases it is seen that we receive a NULL handle on
suspend/resume. One such test case is open browser, suspend
device, resume device, unlock screen. Since we rely on the handle
to get the format, make sure it is not null.

Change-Id: Ia476887a831df33a50b2939a46c143b9c207ea9b
hwc: clean up overlay on external display blank

- On suspend, SurfaceFlinger calls hwc_blank on primary and
  external separately, inbetween these calls there might be a
  update, which leads to acquiring overlay pipes for external
  which will not be cleared and results in showing up stale
  frame on external display
- This change clears all the overlay pipes used on every blank

Change-Id: I44d62b7d0fcd992cf8a26bb0c21df77952bc1381
CRs-fixed: 464070