Added OSX battery support
Refactored OSX battery code
Revert change to segment parameter default value
Update tests to support parameter on _get_capacity()
Merge branch 'osx-battery' into HEAD