Fix stale queries

Stale queries didn't work as the argument value was json_encoded
and thus not recognized as being "ok" or "update_ok" by CouchDB.
This change introduces an exception just for the 'stale' argument.