libhwcomposer: Fence FD Count not handled for CACHED layer

- Fence FD count should not be incremented for CACHED layer

Change-Id: Ie6670bd44d2ff3ee180ee8413bf81154ee122c43
hwcomposer : Fix copybit render buffer fence usage.

Fixing array size to hold fence fd to count of render
buffers used in copybit, and use it to store
fence of corresponding render buffer at the index.

Change-Id: Ic5e7f264c2a81ded2a0f61ef138e59a093b0023a
HWC: Fix for use int reference in function call

To use the integer reference, declared integer
variable to get value directly in that variable.

Change-Id: I1fd1a45580be99dd95ccbc3495e28455a4c7de23
hwcomposer : Fix rotator fence for FB pre rotation.

Add framebuffer to rotator map data structure if
rotator is used for pre rotating framebuffer.

CRs-fixed: 569696

Conflicts:
	libhwcomposer/hwc_fbupdate.cpp

Change-Id: I496656c22b289b0bb0bf8c49056384a7fad3ac7d
hwc: Add deduction operation to Rect utils

Seperate out rectangle deduction from the layer cropping. Update
layer sourceCrop and displayFrame after deducting the rect value.
This makes the function generic enough to be used by other
modules

Change-Id: I587ac951357af823a1bf5e06c15ff47ac6a9c2a0