Implement role 'replication'. Fixes gh-660.

Update tests to use this role.