Currently there is no ability to request a session 'logout' from Salesforce.
Periodically I run into issues with the hard limit on Query Locators in Salesforce (https://help.salesforce.com/apex/HTViewSolution?id=000004410&language=en_US). When I reach the hard cap, I receive the following from Salesforce:
'INVALID_QUERY_LOCATOR' 'INVALID_QUERY_LOCATOR: invalid query locator'
The only work around right now is to just wait for the session timeout to complete, which seems to reset the available query locators.
I request we consider adding a logout command. If there is a valid way to 'close' query locators in Salesforce, without closing the session itself, that would also solve the problem.