Frameworks/base: Wall Werror in libs/androidfw

Turn on -Wall -Werror in libs/androidfw. Fix warnings. Refactor
some code.

Change-Id: I66fe54ace433c15dee5de328b149ca142f74b2dd
Frameworks/base: Turn on -Wall -Werror in cmds

Fix small warnings, turn on -Wall -Werror.

Change-Id: Iab1f01a7c7ebd6ba832b75067c5e395f380a1b8b
Merge "Frameworks/base: Turn on -Wall -Werror in cmds"
Merge "Frameworks/base: Wall Werror in libs/androidfw"