campaignd: Rename and refactor campaign_server class into campaignd::server

This is the first refactoring step.

This moves the class declaration to a separate header file and switches
around some implementation details. Included in this commit are a few
minor documentation changes, a lot of whitespace and placement changes,
and the following API and behavior changes:

 * Reordered server class fields, keeping net_manager_ and
   server_manager_ as the last to initialize.
 * The campaignd hooks configuration (which hasn't been used in ages) is
   now done in the load_config() method rather than directly in the
   constructor.
 * Both read-only mode configuration and control socket set-up are now
   done in load_config() rather than the run() method.

Included as well are a few Doxygen documentation changes of varying
scope. Most notably, the description for the fire() method's return
value is gone since the method was made to not return a value some time
after its inception.

I also took the liberty to spatially-reorganize some of the involved
code except for the fire() method's body (which is massive and had to be
reindented anyway), in order to make the code more fluid and clean to
read.

Overall, there are deliberately no behavior changes in this step other
than the aforementioned minor bits, in order to make the next steps
easier to plan, perform, and debug.
partially remove resources::game_map (part 1)

This is the result of running, in src/ directory, the following:

find . -type f -exec sed -i 's/resources::game_map->/resources::gameboard->map()./g' '{}' \;

and carefully inspecting the result, and adding "game_board.hpp"
fix / -> \
remove resources::game_map (part 2)

This the result of executing, in folder src/, the following

find . -type f -exec sed -i 's/\*resources\:\:game_map/resources\:\:gameboard->map()/g' '{}' \;

and carefully inspecting the result.

We also had to add game_board.hpp includes in various places,
and change the arguent order of unit::is_visible_to_team --
this function was taking *resources::game_map as its default
argument, and we do not want to include game_board in unit.hpp,
as it creates cyclic dependencies. This was resolved by
eliminating this as a default value -- this is an improvement,
since usually when this function was called it was in a context
where a game_map was available already locally anyways.
game_state -> saved_game in test_mp_connect.cpp

my local build doesn't include this file so i didn't notice.
finish removing resources::game_map

The remaining uses are just, checking whether or not the pointer
is null, or resets to its value, or simply storing it in a local
variable.

It might be appropriate to add resources::game_map back as a
function taking no parameters, at least this is flexible
enough to be changed later easily.
Merge branch 'master' of git://github.com/wesnoth/wesnoth
campaignd: Rename a server class field and some scoped_ostream objects

The file_ field is now cfg_file_ to avoid ambiguity ("what file and for
what?"). Since there are a lot of scoped_ostream instantiations around
named cfgfile which are used to write to the cfg_file_ path, those are
now renamed to simply out, also to avoid ambiguity -- just an
intermediate step before refactoring those into a separate method.
campaignd: Refactor config commit boilerplate into a separate method
campaignd: Make input_ a boost::scoped_ptr
campaignd: Replace write_config() scheduling mechanism

Check time() deltas instead of incrementing a counter variable forever.
This should allow to extract a bit of the run() logic into a separate
method later.
campaignd: Refactor request handling blocks into separate methods

These methods are tried and run in sequence by looking them up from a
request handler registry maintained as part of the server object. Since
every campaignd request is a single WML node with an identifying name, I
feel this approach makes things more readable than the previous massive
deeply-nested if-else-if chain approach, but that might be just me.
campaignd: Refactor construct_message/error() functions and boilerplate

This replaces them with two methods that are part of the server class
itself.

These functions were always used in conjunction with
network::send_data() to send the generated WML object to a network
client. Because the config was created within the functions and not on
the callsite, this resulted in a call to the config copy constructor
that could be avoided by grouping the network::send_data() call together
with the WML generation.
campaignd: Move several anonymous namespace members to a new file

This step covers the markup char check function and the add-on feedback
URL formatter.
campaignd: Move and document more ancillary functions

Since the move is between two files, I took this opportunity to rename
a "campaign" parameter to "addon" and tweak the code style for
consistency.
campaignd: Wrap request handler registration statements in macros

This should make it easier to add new handlers or change their API at a
later point.
campaignd: Drop pointless use of lexical_cast to set WML attributes

Since 1.9.x, using lexical_cast to set config attributes is no longer
required and the engine will automatically try to cast string values to
a more "natural" type.

Thus, this commit incurs in no real behavior changes.
campaignd: Use empty C strings instead of t_strings to clear out attributes
campaignd: Show RO mode warning in load_config() rather than in run()
campaignd: Code indentation and spacing style changes for consistency

No functional changes.