Merge xlevus's changes for allowing mutliple api objects in the same thread

A consequence of globally setting the client_id and client_secret is that multiple api objects cannot be used on the same thread. This works for a multi-buyer, single-seller scenario but to could be limited for a multi-buyer, multi-seller scenario. For processing payments for multiple accounts in the same thread, we can allow users to pass in their custom api objects without breaking backwards compatibility.