Add `bit_width` functions

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

    template<typename T> inline std::size_t bit_width();
    template<typename T> inline std::size_t bit_width(T x);

These functions compute the size, in bits, of a type or value, providing
a convenient and self-documenting name for the underlying expression,
`sizeof(…) * std::numeric_limits<unsigned char>::digits`.

This commit adds two additional header `#include` directives in
`src/util.hpp`. The newly included headers are as follows:

  - `<cstddef>`, for `std::size_t`; and
  - `<limits>`, for `std::numeric_limits`.

At first, I obtained the bit width of a byte using the C preprocessor
macro `CHAR_BIT`, defined in the C standard library header `<climits>`,
rather than using `std::numeric_limits<unsigned char>::digits`, but I
subsequently switched to using `std::numeric_limits` per Soliton’s
recommendation at 2014-03-17 21:36Z in the `#wesnoth-dev` IRC channel on
the freenode IRC network (<irc://chat.freenode.net/%23wesnoth-dev>).
Have `bit_width(x)` take `x` by reference.

In `src/util.hpp`, change the following function signature:

    template<typename T> inline std::size_t bit_width(T x);

To the following function signature:

    template<typename T> inline std::size_t bit_width(const T& x);

This avoids needing to call `T`’s copy-constructor, which could be
annoying.
Add `count_ones` function

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

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

This function returns the quantity of `1` bits in `n` — i.e., `n`’s
population count.
Add `count_leading_zeros` function

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

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

This function returns the quantity of leading `0` bits in `n`.
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`.
Merge branch '8573/util/count-leading-ones/1' of https://github.com/8680-wesnoth/wesnoth into codepoint_count
Improve byte_size_from_utf8_first()

The count_leading_ones function by 8680 improves speed and readability
of this function which parses UTF-8 characters.
ai_helper.get_closest_location(): fix bug with tags in SLF

The way how the Standard Location Filter was dealt with only worked
with keys, not tags.
Messenger MAI: fix bug with escort units blocking the messenger

When there were lots of escort units, they previously quite frequently
blocked the messenger’s way, preventing him from making progress even
when it was possible.  Escort units now specifically move out of the
way if they do not need to attack enemy units in the messenger’s way.
Messenger MAI: allow several messengers to be controlled by AI

For two of the CAs this mostly just means reading the [filter] tag and
picking one of the messengers.  However, for the CA moving the escort
units, it means a complete rewrite, as the AI now needs to figure out
which escort unit should be moved toward which messenger.
Messenger MAI: add optional invert_order= key

In the default configuration, the AI moves the messenger which has
advanced the furthest through the waypoints first.  If this key is set,
the rearmost messenger is moved first.
MAIs: minor code simplification in AIs that take both [filter] and id=

These are the AIs that used to use Behavior Candidate Actions (BCA).
Patrol MAI: fix bug with save/load persistent data storage

WML values may not be used as keys, this can make savegames invalid.
Store information in the units now rather than in self.data. (Note:
storing in self.data would also be possible if the syntax were changed.)
fixup b854aab437f157eea642131b882a4987a95c5b6b (ai side drops)

logic error was introduced in client side controller types:
when a player drops and controls an ai-side, the side_drop signal
is only sent to the host, who should make that side a local ai,
not a networked ai.
don't show petrified units in "Damage versus:" tooltip

since we can't attack these, this information is not useful.
afaik it is quite common to have permanent "statues" in MP maps,
and extremely rare that units may be unpetrified in any core or
umc scenarios.
update changelog
updated Slovak translation
updated Hungarian translation
Mark Wesnoth not high-resolution capable

Greatly improves performance on retina devices
Remove references to unused flag ENABLE_OPENMP_SUPPORT

Not available in clang, gcc support unstable in versions available in
Xcode. Defaults to no