Fix regression in delta cursor generation.
Fix regression in delta cursor generation.

Without filtering the secondary sort on namespace_id, we may give you a cursor
for another namespace, which you then can't use for anything.

ErinCall/sync-engine,closeio/nylas,jobscore/sync-engine,PriviPK/privipk-sync-engine,EthanBlackburn/sync-engine,EthanBlackburn/sync-engine,EthanBlackburn/sync-engine,ErinCall/sync-engine,wakermahmud/sync-engine,gale320/sync-engine,PriviPK/privipk-sync-engine,wakermahmud/sync-engine,PriviPK/privipk-sync-engine,Eagles2F/sync-engine,closeio/nylas,EthanBlackburn/sync-engine,gale320/sync-engine,Eagles2F/sync-engine,ErinCall/sync-engine,closeio/nylas,ErinCall/sync-engine,jobscore/sync-engine,gale320/sync-engine,nylas/sync-engine,Eagles2F/sync-engine,Eagles2F/sync-engine,PriviPK/privipk-sync-engine,nylas/sync-engine,closeio/nylas,PriviPK/privipk-sync-engine,wakermahmud/sync-engine,jobscore/sync-engine,jobscore/sync-engine,wakermahmud/sync-engine,gale320/sync-engine,gale320/sync-engine,EthanBlackburn/sync-engine,wakermahmud/sync-engine,nylas/sync-engine,ErinCall/sync-engine,Eagles2F/sync-engine,nylas/sync-engine