Attempt to fix the zero-result-set forever fetch problem.
The problem is that the client tries to greedily fetch the rows that should
be visible in the viewport. This caused a problem that if the grid returned
zero rows, then it triggered the fetch again and again ad infinitum.
I already tried to fix this once, but apparently the solution was not solid
enough. This time I differentiate between length=0 when the server
explicitly said that the result set contains no rows, and length=null
which means that the cache was just cleared by the client and we
must initiate a fetch in any case.
Merge branch 'master' of github.com:Pylons/substanced