Don't attempt to get changes if we know the state is gone.
Don't add the collection here, we might not have the folder_type yet.

We add/update later in the request once we have all the information.
All we need to do here is update the windowsize if needed.
Fix assignment
This may not always be set.
Add note to remind me why this might be empty.
Refactor GETITEMESTIMATE a bit to be more efficient.

Don't even attempt to get change count or initialize state if we
already know something else is wrong.
Simplify/improve.

Some more improvements to SYNC code.
fix phpdoc