[common_c] Refactor ACPI

This makes the port to BSD much easier, and also adds support for
multi-battery systems. Also makes acpi.c a bit cleaner.
Merge branch 'master' of github.com:NuckChorris/assault