Fix random number generator usage for unique-id

note: the performance of many  implementations of
random_device degrades sharply once the entropy pool
is exhausted. For practical use, random_device is
generally only used to seed a PRNG such as mt19937.
means: re-use the mt19937 instance (only init once)
Merge pull request #686 from mgreter/fix/random-numbers

Fix random number generator usage for unique-id