potential fix for issue #335
fix test for issue #335

Updated sync function role based tests to pass a Map with role names as keys, rather than an array of role names
Merge pull request #348 from couchbase/feature/issue_335

Fix requireRole() function

Fixes #335