util: initialise the rng inside a std::call_once

This makes it threadsafe.
util: explicitly cast to unsigned int when initialising the rng

Closes issue #77
Merge pull request #79 from gicmo/win_rand

Looks all OK