exchnage: set the gender
exchang: guid/gid support in the state.py

Replicate some of the code for initialising and managing the GUID/GID
stuff for the new Exchange store. the gid_base logic is itself a bit
unnecessary as we want to get away from the sync_tag business
completely. But that will be a separate activity and we will figure
it out later. For now we will just go ahead with replicating the
functionality as it is for OL.