Rearrange the logic in do_failover() for further improvements.

Specially, make this a more coordinated process by making all
nodes waiting for the others before going to the next step.

This is one step further in following Andres Freund advices
but there is still a lot to do in order to complete that,
specially it could be needed to add more fields to repl_nodes
and to the shm area.
Make repmgrd survive to the failover

To do this it needs to reconnect to the new master
Rework algorithm to coordinate voting

Make this by waiting for all nodes to finish a step, before starting
a new one. So everyone starts promoting or following in a coordinated
fashion.
Also make a few fixes.
Make repmgr compile in 9.3.

Patch provided by Shawn Ellis with some fixes by me.
Ignore pg_log when cloning, just like we ignore pg_xlog
Fix some typos

Patch by Krzysztof Gajdemski
Add timestamps to log line in stderr

Patch by Christian Kruse
Add guc_setted_typed() function to allow
wal_keep_segmeents to be checked as an integer instead
of text

Patch by Jay Taylor
Add a ssh_options parameter to allow ssh checking
to consider non-default values (ie: a different port)

Patch by Jay Taylor
Update history and credit files
Update debian control file
Files to create the debian package

Patch by: Christian Kruse
Fix oversight in the header of guc_setted_typed()
fix: do not exit() in create_pgdir()

This could leave the database in a locked state (pg_start_backup()).
And since all calls to create_pgdir() handle the return value correctly
we simply replace the exit() by a return false
fix: do not exit after pg_start_backup() w/o pg_stop_backup()
fix: remove own node earlier if force is set

We have to remove our own node before we check for a new master if force
is set; else master register would fail on the second time since there
already is a master (ourselves), even if we specify -F
fix: correctly check the return value of PQexec()

not only check if return value is not NULL but also check that the
returned result is a PGRES_COMMAND_OK (e.g. the INSERT was successful)
fix: create data directory after sanity check
fix: do not compare pointers but the strings
white space cleanup