Fix test failure in new test due to division changes in Python 3

In Python 3 (through PEP 238), division behavior changed such that it always
returns a float. This proceeds to cause problems with the CouchDB query
parser, so we change the test case to use the floor division operator
(which has the same behavior as default Python 2 division).
Add some vertical whitespace to a complex loop
Add newline to fit newly add call into 80 columns