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
fix signed unsigned comprision
simplyfy utf8::iterator implementation
remove double declarations in unicode.hpp
add custom codecvt for better error mesages.

this codecvt gibes errormessages in LOG_FS if it meets an invalid utf8 char.
also the boost codecvt seems inconsistetn becasue it seems on msvc it acepts utf8 AND ansi while it only accpets ansi on mingw.

Conflicts:
	src/filesystem_boost.cpp
use unicode programm args on windows

Conflicts:
	src/game.cpp
fix missing inclide (backport error)

The include of boost locale was missed when backporting this
commit:

0ba4e1488fd9bc301abe5f873016c9bdc84353fe