Make sure attachment lengths (and other numbers) don't go scientific

When a revision is parsed from JSON we now postprocess it to convert
unnecessary float64 values to int64. This prevents those numbers from
being marshaled into scientific notation when the revision is sent in
an HTTP response. (In particular, CouchDB barfs if attachment "length"
properties are scientific.)
GET should include attachments of revs in '?open_revs' mode

open_revs mode returns a multipart response with one part for each
requested revision. If any of the revisions have attachments, then the
corresponding part should itself be a multipart body with the JSON
followed by attachments.
With this fix, CouchDB's replicator can pull docs with attachments from
the gateway.
Fixes #50