Refactor lib/facebook.js to export a BASE_URL for FB graph server.

This is primarily just so we can easily integration test the library
with a fake server.

Also made a few minor formatting changes to make some lines not so
long.
Added lib/facebook test suite. Only tests publishComment() for now.

This is something of an integration test, since it actually sets up a
fake open graph server that the library talks to.
slightly better test names.
fixed an error message bug in lib/facebook.js.
Added tests for extendUserAccessToken(), checkApplicationAccess() to fb lib.
some fixes to fake facebook graph server.
Added tests for publishBadge() to facebook lib.

However, this required changing the behavior of the function, because
its current behavior seems odd: it's calling an internal function,
publishGraphObject(), which parses the JSON response of facebook and
returns the id of the new open graph object. But then the caller
attempts to parse that id as JSON, and return it, which seems odd. So
I changed the function to just pass through the id. Will need to ask
@davelester if this is ok or not.
Merge pull request #718 from toolness/lib-facebook-tests

Add test suite for lib/facebook.js.