Resolve min function to std namespace

Constructor of nested param_t type of the piecewise distribution
classes has one data member initialized by a bare call to min(T a, Tb).
With OS X Clang this tries to resolve to incorrect internal min
function rather than in std namespace.

Explicitly resolve usage of min to std:min, and perform static_cast on
first argument to size_t to give correct conversion on older stdc++.
Provide conservative fallback to cpp0x on Clang

Clang's feature macros correctly report support when using older
libstdc++ implementations. However, cpp0x uses several features which
whose availability cannot be reliably checked through preprocessor
macros. This is due to Clang not indicating the actual GCC version in
use, and that the __GLIBCXX__ macro gives a release date rather than
actual version (i.e. a patch of, say 4.5, may be newer in time than the
4.6 release).

For the features relying on Clang version checking, further require
that __GXX_EXPERIMENTAL_CXX0X__ and _LIBCPP_VERSION are defined.
The former, whilst not 100% reliable as it will disappear in future
according to GNU is good enough for now. The latter is only set when
using Clang's libc++, which should implement all the functionality.

NB: Needs checking on Linux as libc++ support may not be so reliable
there, and may have better conforming libstdc++ which would create
name clashes.
Make nested param_t class of bernoulli_distribution public

Clang with libstdc++ complains about the nested param_t class of the
bernoulli_distribution being private. It does not for Clang with libc++.
Clang's implementation does not have this type private, so change
storage class to public.
Protect CPP0X_HAS_CMATH_C99 with version/c++11/libc++ check

The GNU compiler did not introduce the cmath functions in the std
namespace until GCC 4.5. For Clang, protect the setting of the cpp0x
define indicating this behaviour to sufficient Clang version, existence
of c++11 and usage of libc++. This is very conservative, so may result
in errors on other clang versions and/or others using better libstdc++.
Provide clang test case

Wrap check on compiler version in #ifdef blocks to prevent expansion
of non-existent gcc macros when running clang.
Note the problem of constexpr with Clang/libstdc++

Probable that we're really going to need compile checks...