fix startkey/endkey backwards representation

http://manage.dimagi.com/default.asp?114134
Merge pull request #3545 from dimagi/fixture-apis

fix startkey/endkey backwards representation