Don't fail if the target is a direct ancestor of the source.

If the old master is cleanly shut down before promoting the standby, and
you later use pg_rewind to prepare for a fail-back, it throws an error
like:

0/4000090 on timeline 1 could not previous WAL record at 0/4000090: record with zero length at 0/4000090

It tries to walk backwards from the first WAL record in the divergent history,
but if there are no WAL records in the target, it fails.

To fix, detect the situation by looking at where the target's checkpoint
record ends, and exit successfully with return code 0 if there is nothing to
do.
Correct history file parsing.

Fix a history file parsing error which prevent parsing the hole history file.

This commit should fix errors when reseting a old master with timeline id > 1
and new master with timeline id >2.

Formerly the error message "could not find common ancestor of the source and
target cluster's timelines" was printed.
Add .gitignore in root folder

It contains the usual stuff to ignore, with additions for the binary
pg_rewind as well as for the file xlogreader.c fetched from the PG
source tree at build phase.
Fix username in pg_hba.conf in test script

The script contains a reference to user "heikki", something quite
restrictive. This is changed to "all", which is fine as this is
only a sanity test.

Patch by Samrat Revagade
Make README a bit less confusing

This takes care of correcting some typos, as well as some expressions
that were a bit confusing.

Patch from Samrat Revagade, with some small changes by me.
Remove data directories before node init in test script

Because of the deletion of the new and old data directory was forgotten,
it was simply not possible to run twice in a row the same test.