Modify activity args when posting a group-associated doc

This is necessary to ensure that the edits show up in the group activity
stream.

Note that this method will not work correctly when associating with
multiple docs. More research is needed.

Note also that this change means that we can't depend on the doc id
being the doc. This is bound to cause problems when using the activity
stream in advanced ways, but there is no good alternative at this point.

Based on an original implementation by @r-a-y in r-a-y/buddypress-docs@88841ea1f12399ea79184bf5398d59ca29329584

See #353