lua function to get a formatted string with the current battery status. Can be used to fill a text widget in the awesome window manager.