move credential encoding to PebbleBucks.URLCredentials

modify PebbleBucks.onShowConfiguration and PebbleBucks.fetchData to use this new function
Merge pull request #19 from henriwatson/master

Move credential encoding to PebbleBucks.URLCredentials