store random_seed in cfg by lexical cast uint32_t <-> std::string

This commit changes the way seed info is handled by the server,
clients, and cfgs, to prevent silent conversion between int
types. In this version there is the drawback that rng construction,
and therefore game_state construction (!) can now throw a bad
lexical cast. This commit should be amended in the future to deal
with this appropriately.
add seed_rng namespace and files

In order to separate the "seed source" objects from the actual
PRG objects, this adds a new file and name space "seed_rng" which
can be used by rng's which are constructed without a seed.

The implementation has preprocessor guards, and should be either
boost::random_device or just the system time if that is
unavailable.

Since it goes on server as well this file also needs to be in
wesnoth-core.
add std::string versions of seed, get_seed to mt_rng
fixup comment
use stringstream to get seeds from configs, not lexical cast

Also, get seed values for configs from the get_random_seed_str
function.

We don't otherwise mess with the types of synced_context etc.
The basic types of those objects, seed_generator etc. is the
same except that int -> uint32_t.

Fixes up commit cdefb9c98e8517c5c2b532970fdaf22d8c1b73de
refactor synced context to use std::string, not int, for seeds

This allows to mark the "seed" function of mt_rng which takes
a uint32_t as private, leaving only the std::string option
public.

With this change it should be completely unknown to the engine
that the mt rng internally uses uint32_t, only the wrapper class
should know this. There will still be some stringstream ops on
the server-side though, to map uint32_t rng results to hex strs.
add unit tests for rng

The tests validate only a small part of the functionality:

- boost::mt19937 with default seed gives a particular long int as
its 10,000'th query, specified by boost
- rand_rng::mt_rng class properly transforms seeds from uint32_t
to std::string in hex notation and back
fixup mt_rng constructor

Use config::attribute_value and str() rather than std::string as a
temporary variable.
add next_seed_str to seed_rng, and use in synced_context

This commit moves some of the stringstream manipulations of seeds
into the seed_rng namespace and thus out of the rest of the engine.
add rng reproduction unit tests and fixup ctor, discard

This commit adds some unit tests which test reproducibility of the
rng from the info that we store in configs.

The unit tests do things like, construct an rng in any of several
ways, use it a bit, get its state to a config, construct a 2nd rng
and test that these have equal state / give equal random draws.

The code fixups are to be more disciplined about using the
random_calls_ variable, initializing to zero and always setting
using the seed function. The discard function now uses
get_next_random rather than mt_(), so that it atomically counts
the number of random calls.
mt_rng extends the boost uniform rng concept
random_new and derived now impl boost uniform rng concept

This means they can be used as arguments to boost distributions,
without messing up the random_calls count.

http://www.boost.org/doc/libs/1_55_0/doc/html/boost_random/reference.html#boost_random.reference.concepts.uniform_random_number_generator
use boost::uniform_smallint for attacks, traits, genders

Using a boost distribution ensures that random sampling will be done
accurately on all platforms with less room for error from us.
add coverage unit tests

I wanted to make sure that even when the seed corresponds to a hex
string with leading 0s and no letters, these won't be truncated by
the config object. This unit test tests a variety of such strings
and similar.
Test sending rng seeds over the network

This test makes a series of configs which look like rng seed updates,
sends them using the network layer, and recieves them, and checks the
integrity. It includes hex strings which are all numeric and begin
with leading zeros, to be sure that the leading zeros are not
truncated. The list of seeds is duplicated from part of test_rng.cpp.
require random 1.40.0 only, use ctime if WIN32 && boost_v < 1.43.0

Fixup seed_rng to check for windows and boost version < 1.43.0.
This allows to downgrade boost random lib requirement to 1.40.0.