squash! Move attachment code into couch_att