refactor lib/sinon to attach API to an object

due to circular dependencies, sinon needs to be defined on `exports`.
fake_xml_http_request needs sinon to exist

due to the call to sinon.extend, there's no point in declaring the sinon global if it doesn't already exist
return sinon from makeApi
explicit dependencies for fake_xml_http_request
explicit dependencies for event