Clean up stale locks in client.close() and split CLOSED state into CREATED and CLOSED to separate startup from client closed states.