SMS: query_balance function

We can retrieve the remaining balance without sending a new SMS message.
Implement a separate function so the web interface can use it to display
the remaining balance to the user.