Makes stathat.erl be a gen_server

Changes stathat the module into stathat the gen_server. 
This means that requests are really async, and the caller 
can ignore the httpc return values (but we can do something 
with them).
Merge pull request #5 from lenary/patch-1

Makes stathat.erl be a gen_server
Fix syntax errors causing compilation failures.
API URL has changed.
Erlang has a stdlib function to handle encoding.
Whitespace change.
Merge pull request #6 from aeden/master

Various fixes