Fixes #4968 Added target_guid and related functionalities to river

This PR may still need some work. Comments are welcome.

Ticket: http://trac.elgg.org/ticket/4968

This PR is required before #365 can be pulled in.