Reset the FrameNumber for dropped frame in async mode

In Async, reset the framenumber of frames dropped by the BufferQueue.
This allows the client to dequeue and use this frame before the other
queued frames which may be with the MDP.

CRs-fixed: 448606

Change-Id: Icaabf77b55a7275dc98ba1fdfba89508feb92145
Check fence is not NULL before dereferencing it

If the fence obtained in dequeueBuffer is NULL, don't dereference it.
This will avoid a crash in surfaceflinger.

CRs-fixed: 516300
Change-Id: I3054dc37087103f3addae7884bb03460484a1eec
Merge "Reset the FrameNumber for dropped frame in async mode" into jb3
Merge "Check fence is not NULL before dereferencing it" into jb3