make result iterators query the database eagerly (#261)
make result iterators query the database eagerly (#261)

Previously, ResultIterators would query the database lazily. Specifically, they
would only fetch a row from the underlying cursor when an Item was pulled from
the iterator. This was a performance optimization. However, it was causing
endless headaches due to SQLite's locking policy: as long as the cursor is
"open", it holds a reader lock. This led to many hard-to-diagnose problems when
trying to acquire a writer lock. This solution may require a little more memory,
but it should put an end to this kind of bug for good.

lengtche/beets,untitaker/beets,mried/beets,ibmibmibm/beets,shanemikel/beets,asteven/beets,bj-yinyan/beets,drm00/beets,tima/beets,Wen777/beets,shamangeorge/beets,arabenjamin/beets,parapente/beets,marcuskrahl/beets,sadatay/beets,xsteadfastx/beets,multikatt/beets,sampsyo/beets,MyTunesFreeMusic/privacy-policy,mclearc/beets,sampsyo/beets,jcoady9/beets,swt30/beets,madmouser1/beets,pkess/beets,m-urban/beets,mosesfistos1/beetbox,diego-plan9/beets,andremiller/beets,multikatt/beets,PierreRust/beets,ruippeixotog/beets,ruippeixotog/beets,ngokevin/beets,jmwatte/beets,mathstuf/beets,mried/beets,m-urban/beets,Andypsamp/CODfinalJUNIT,arabenjamin/beets,pkess/beets,ruippeixotog/beets,untitaker/beets,swt30/beets,kelvinhammond/beets,tima/beets,untitaker/beets,Andypsamp/CODjunit,ngokevin/beets,MyTunesFreeMusic/privacy-policy,mathstuf/beets,sadatay/beets,randybias/beets,ttsda/beets,ruippeixotog/beets,parapente/beets,randybias/beets,sadatay/beets,jackwilsdon/beets,shanemikel/beets,jackwilsdon/beets,xsteadfastx/beets,madmouser1/beets,Kraymer/beets,madmouser1/beets,dfc/beets,sadatay/beets,mclearc/beets,m-urban/beets,drm00/beets,arabenjamin/beets,ttsda/beets,imsparsh/beets,Kraymer/beets,beetbox/beets,Freso/beets,jbaiter/beets,asteven/beets,mried/beets,gabrielaraujof/beets,lightwang1/beets,YetAnotherNerd/beets,randybias/beets,mosesfistos1/beetbox,krig/beets,SusannaMaria/beets,Freso/beets,parapente/beets,artemutin/beets,bj-yinyan/beets,drm00/beets,kelvinhammond/beets,moodboom/beets,swt30/beets,SusannaMaria/beets,Kraymer/beets,artemutin/beets,sampsyo/beets,Freso/beets,tima/beets,arabenjamin/beets,aspidites/beets,shamangeorge/beets,asteven/beets,mathstuf/beets,YetAnotherNerd/beets,madmouser1/beets,Andypsamp/CODjunit,moodboom/beets,mried/beets,kareemallen/beets,bj-yinyan/beets,multikatt/beets,marcuskrahl/beets,shanemikel/beets,tima/beets,Freso/beets,ibmibmibm/beets,shamangeorge/beets,ibmibmibm/beets,dfc/beets,artemutin/beets,Andypsamp/CODfinalJUNIT,pdf/beets,beetbox/beets,jackwilsdon/beets,mathstuf/beets,ibmibmibm/beets,aspidites/beets,lightwang1/beets,Wen777/beets,swt30/beets,m-urban/beets,Dishwishy/beets,lengtche/beets,sampsyo/beets,mosesfistos1/beetbox,Andypsamp/CODfinalJUNIT,jcoady9/beets,MyTunesFreeMusic/privacy-policy,gabrielaraujof/beets,dfc/beets,Dishwishy/beets,SusannaMaria/beets,moodboom/beets,Andypsamp/CODfinalJUNIT,shamangeorge/beets,krig/beets,YetAnotherNerd/beets,jayme-github/beets,moodboom/beets,asteven/beets,PierreRust/beets,kareemallen/beets,lengtche/beets,LordSputnik/beets,gabrielaraujof/beets,ttsda/beets,artemutin/beets,jcoady9/beets,gabrielaraujof/beets,untitaker/beets,shanemikel/beets,mosesfistos1/beetbox,beetbox/beets,PierreRust/beets,multikatt/beets,jbaiter/beets,YetAnotherNerd/beets,mclearc/beets,bj-yinyan/beets,Andypsamp/CODjunit,jmwatte/beets,LordSputnik/beets,LordSputnik/beets,Dishwishy/beets,LordSputnik/beets,ttsda/beets,PierreRust/beets,diego-plan9/beets,diego-plan9/beets,dfc/beets,kelvinhammond/beets,andremiller/beets,randybias/beets,Andypsamp/CODfinalJUNIT,jayme-github/beets,SusannaMaria/beets,lightwang1/beets,jcoady9/beets,Dishwishy/beets,jackwilsdon/beets,jmwatte/beets,diego-plan9/beets,parapente/beets,Andypsamp/CODjunit,marcuskrahl/beets,marcuskrahl/beets,lengtche/beets,pdf/beets,imsparsh/beets,imsparsh/beets,kareemallen/beets,Andypsamp/CODjunit,kelvinhammond/beets,pkess/beets,pkess/beets,Wen777/beets,lightwang1/beets,andremiller/beets,Kraymer/beets,imsparsh/beets,jmwatte/beets,xsteadfastx/beets,krig/beets,beetbox/beets,xsteadfastx/beets,drm00/beets,kareemallen/beets,MyTunesFreeMusic/privacy-policy