uri.cc: Use auto instead of adhoc typedef
Include prefs.h instead of typedef PrefPtr everywhere
Move OpenSSL_add_all_algorithms() to Platform::setUp()
SimpleRandmizer: Fix certain bits generated by getRandomBytes are always 0

This is because in Linux RAND_MAX is 2**31-1 and we used int32_t to
hold random number from random() and got each bytes. This means that
highest bit is always unset. In little endian system, every 4n-th (n
>=0) byte has highest bit is unset. To fix this, we just use lower 2
bytes of random().