[AUR-3018] IMplements joins in CouchDB

- Added a function to generate UUIDs as expected by CouchDB.

Change-Id: I14b3ed43743e34c62228abaff98936a09a4c747d