hidpp: try harder not to report 0% battery

 (1) If the K800 keyboard is charging via the USB cable, it will report
     itself as Charging, but with a discharge level of 0 (which means
     "unknown". In this case, the previous known value (before
     connecting the cable) is always a better approximation than using
     zero.
 (2) When the K800 has fully charged (but with the cable still plugged
     in), it will still report 0 as discharge level. "Full" is 100% by
     definition, so let's fallback to that value.

Signed-off-by: Peter Wu <lekensteyn@gmail.com>
Signed-off-by: Martin Pitt <martinpitt@gnome.org>
Set locale in daemon and tool

This is necessary to properly show non-UTF8 strings in debug mode (for the
daemon) and upower --dump etc. (for the tool).
linux: Detect the battery of bluetooth input devices.

First, checking the device path. If it contains 'bluetooth', it is a bluetooth
devices. Second, checking if there is an input folder. If there is mouse
folder under the input folder, it is a mouse device. Otherwise, it is a
keyboard device.