improve couch:get/{2,3}

this change remove the pre vious hack using a process. Instead it
directly get the attachments from the FD instead of trying to reuse the
fold function which is more efficient.

ex:

1> {ok, Db} = couch:open_db("testdb").
{ok,{cdb,<<"testdb">>,
         [{user_ctx,{user_ctx,null,[<<"_admin">>],undefined}}]}}
2>
2> {ok, {stream, Next}} = couch:get(Db,
<<"5f480e40beb20ce551d848a8b5000df7">>, [stream, {open_revs, all}]).
{ok,{stream,#Fun<couch.4.128415972>}}
3> {doc, DocId, Doc, Next1} = couch:stream_doc(Next).
{doc,<<"5f480e40beb20ce551d848a8b5000df7">>,
     {[{<<"_id">>,<<"5f480e40beb20ce551d848a8b5000df7">>},
       {<<"_rev">>,<<"2-6cc0258e6120c8cdff8a3c75930ce542">>},
       {<<"_attachments">>,
        {[{<<"frais_enki.ods">>,
           {[{<<"content_type">>,
              <<"application/vnd.oasis.opendocument.spreadsheet">>},
             {<<"revpos">>,2},
             {<<"digest">>,<<"md5-6DZZHRxjEI8Qr+yTLpjG5g==">>},
             {<<"length">>,30272},
             {<<"follows">>,true}]}}]}}]},
     #Fun<couch.6.128415972>}
4> {att, Name, Info, Next2} = couch:stream_doc(Next1).
{att,<<"frais_enki.ods">>,
     [{name,<<"frais_enki.ods">>},
      {att_len,30272},
      {disk_len,30272},
      {type,<<"application/vnd.oasis.opendocument.spreadsheet">>},
      {encoding,identity}],
     #Fun<couch.7.128415972>}
5> {att_chunk, Name, Bin, Next3} = couch:stream_doc(Next2).
{att_chunk,<<"frais_enki.ods">>,
           [<<80,75,3,4,20,0,0,8,0,0,88,52,218,68,133,108,57,138,46,
              0,0,0,46,0,0,...>>,
            [<<52,8,206,212,207,125,241,127,65,183,48,80,111,24,98,
               201,116,181,196,118,100,19,198,...>>,
             <<201,73,196,40,144,209,130,188,188,211,115,50,83,211,42,
               42,190,22,60,126,150,236,...>>,
             <<74,89,81,14,76,36,22,19,85,95,12,4,91,52,47,47,72,79,
               168,219,124,...>>,
             <<253,84,21,6,113,151,86,21,15,181,59,71,117,32,89,45,94,
               109,60,36,...>>,
             <<198,71,68,233,8,121,55,205,186,61,196,110,68,199,143,28,
               227,6,210,...>>,
             <<0,0,0,2,0,0,0,0,0,0,0,80,75,3,4,20,0,0,...>>]],
           #Fun<couch.15.128415972>}
6> {att_eof, Name, Next4} = couch:stream_doc(Next3).
{att_eof,<<"frais_enki.ods">>,#Fun<couch.17.128415972>}
7> {doc_eof, DocId} = couch:stream_doc(Next4).
{doc_eof,<<"5f480e40beb20ce551d848a8b5000df7">>}