update battery plugin to be charging-aware on mac

* Updated algorithms to determine time remaining
* added functions to detect if charging, and pull multi-use shell-outs into functions
* added functions to determine time to complete charge