added better error handling to all REST API calls

put all JSON parsing into try/catch statements to keep applications from
exiting with parse errors when the Tesla REST API is not working
correctly (which is unfortunately way to often)