frameworks/native: fix copy back dirty region

Copyback dirty region logic does copyback,
even when its not necessary causing 2ms delay.
Fix the logic to copy back only what is necessary.

Change-Id: I52de68258ac9f87d704ee5401f93417805fa6773
SensorEventQueue: Allow setRate on sensor enable

4.3 and earlier would set the sensor rate on activation and then set it again
when setRate was called.

Some sensor HALs assume this will happen and ignore the first setRate

Conditionally the first one back in for such broken HALs

Change-Id: If1c259b0fd5517a1272cdad0a1abf1fe0fb5a7d1