Add `count_leading_ones` function

Add the following function in `src/util.hpp`:

    template<typename N> inline unsigned int count_leading_ones(N n);

This function returns the quantity of leading `1` bits in `n`.

Conflicts:
	src/util.hpp
backport our unicode functionality

This commit backports the src/serialization/unicode files.
I'm not sure exactly why they weren't backported before, probably
it was thought not necessary. However it will be hard to backport
gfgtdf's unicode fixes without this, and I don't see that it can
hurt.

There were some other issues relating to unicode that were not
backported in this manner, for instance in master the addon code
uses the unicode functions but in 1.12 it uses some slightly
different code. We should perhaps roll that over as well.
copy characters from clipboard as unicode on windows.
remove comment

SDL_RWops is returned by pointer so we don't need to worry about the msvc bug.
fixup windows clipboard
allow copying unicode in wesnoth

this completes a previous commit which enabled pasting unicode.
add scons check for boost_locale for windows

TODO: maybe the file scons/boost.py should also be changed?
Conflicts:
	SConstruct
add { } to BOOST_FOREACH
fix use of ...A( winapi functions for fonts.
make lua dofile use our filesystem functions
fix filesystem_boost.cpp on mingw

this raises our dependency for boost iostream to 1.44 or above

Conflicts:
	src/filesystem_boost.cpp
add boost 1.44 comability

it seems like iostream from boost 1.44 is incompatible to filesystem
from boost  1.44.
Actualy i didnt veryfy this becasue i don't have boost < 1.50. I added
an adapter for boost filesystem that made it looks liek filesystem 1.43
which we can pass to boost iostreams 1.44.

Conflicts:
	src/filesystem_boost.cpp
fix msvc warning
make unicode_cast more generic

unicode_cast is now a template function that works with different types
of containers. Especialy it now works with both std::wstring and
vector<wchar_t>

Conflicts:
	src/gui/auxiliary/event/handler.cpp