(#190) - implement attachments=true for query()

Some inline notes below.


Testing three cases:

* include_docs=true, attachments=true,
* include_docs=true, attachments=false,
* include_docs=false, attachments=true