Adds a method that print a battery gauge

It is especially useful for themes, this function is a port of the code written by Steve Losh
and made available on [this blog entry](http://stevelosh.com/blog/2010/02/my-extravagant-zsh-prompt/#my-right-prompt-battery-capacity)
Merge pull request #2402 from bric3/battery_level_gauge

Adds a method that print a battery gauge