power: Dejankify backlight brightness animations.

Make powerd not restart the backlight animation timer when
the current transition is interrupted by a new request, as
happens when holding down a brightness key.

Also simplify some old code in the InternalBacklight class
and reduce the brightness update frequency from 30 ms to 20
ms (it was effectively 50 ms before this change when holding
a brightness key, but 30 ms is still slightly flickery on
lumpy).

BUG=chromium:358938
TEST=manual: panel backlight animations are no longer
     flickery on lumpy, and panel and keyboard animations
     both look fine on pixel; also added tests

Change-Id: I4e18541dadbeb9fc8abf241f2833bf32d5bc6597
Reviewed-on: https://chromium-review.googlesource.com/196261
Tested-by: Daniel Erat <derat@chromium.org>
Reviewed-by: Chris Masone <cmasone@chromium.org>
Commit-Queue: Daniel Erat <derat@chromium.org>
3 files changed