Add a few missing headers.

Fixes build with gcc 4.3.2 on Debian.

Signed-off-by: Alexey Zaytsev <alexey.zaytsev@gmail.com>
Added broadcasts for external power events.
Change values of ACTION_POWER constants to better match established practice.

Trim code to 100 lines to match style guide.
Fix typo. It's "picasa", not "picassa".