Pouch.uuids as a utility #569

Utilize browser's random number generator to generat
UUIDs. Accepts a seed number (between 0 to 1), which
can be used to ensure cross browser uniqueness.

Signed-off-by: Rohan Jain <crodjer@gmail.com>
Use existing UUID generator and better tests

I don't have a convincing reason for the new implementation, so
using Math.uuid for exposing `Pouch.uuids`.

`Math.uuid` exposes three ways to generate uuids. The default
method used in Pouch.uuids is `Math.uuidFast`. If we don't have
any reason to keep all three, it would make sense to remove the
other two for the one we think will work out best.

Also, the Pouch.uuids is defined in pouch.js instead of utils.

Signed-off-by: Rohan Jain <crodjer@gmail.com>
Single way to generate UUIDs; API for Pouch.uuids

Remove UUID methods from deps/uuids.js which were not being used, but
present from the library. The API to use Pouch.uuids is:

            Pouch.uuids(count, options)

where options is a object which can be used to change
the UUID format. It accepts:

    length: The length of UUID string
    radix: The base for characters in the UUID

Examples:

>>> Pouch.uuids()
"92329D39-6F5C-4520-ABFC-AAB64544E172"]

>>> Pouch.uuids(10, {length: 32, radix: 5})
[ '04422200002240221333300140323100',
  '02304411022101001312440440020110',
  '41432430322114143303343433433030',
  '21234330022303431304443100330401',
  '23044133434242034101422131301213',
  '43142032223224403322031032232041',
  '41121132424023141101403324200330',
  '00341042023103204342124004122342',
  '01001141433040113422403034004214',
  '30221232324132303123433131020020' ]

Signed-off-by: Rohan Jain <crodjer@gmail.com>
Pouch.uuid convenience method over Pouch.uuids

Signed-off-by: Rohan Jain <crodjer@gmail.com>
Use Pouch.uuid[s] in adapters

Instead of Math.uuid, use the in Pouch API: Pouch.uuid/Pouch.uuids

Signed-off-by: Rohan Jain <crodjer@gmail.com>