Fix safer_yield_per
Fix safer_yield_per

Summary:
I got bitten by a weird interaction between SQLAlchemy and MySQL: sometimes a call to `safer_yield_per` wouldn't return all the rows we asked. It seems it's because MySQL is opportunistic and doesn't return the rows in order.

I fixed this by sorting rows ascendingly.

Test Plan: Tested manually

Reviewers: kav-ya, emfree

Reviewed By: emfree

Differential Revision: https://review.inboxapp.com/D1407

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