[client] Improve ignore file.

Ignore local changes to ignored files.

Consider the following sequence:
1. a file is committed;
2. this file is added to seafile-ignore.txt so it's ignored from now on;
3. this file is changed;

If we don't ignore changes to this file, the worktree will be left in
an unclean state and pauses sync.

The same rule also applies for files under an ignored folder.

To make it easier to check whether a file is under an ignored folder,
we have to apply a restriction:
If you want to ignore folder 'foo', you write 'foo/' in seafile-ignore.txt.
Writing 'foo' will only ignore regular files or symlinks.
[client] Create conflict file if local file was changed during checkout.
[client] Fix a minor bug in sync.

When commiting an unclean merge, second parent id should not be
directly set to current master branch head. The master branch
may have been updated after the last merge. In this case, second
parent id will be incorrect.

To solve this, we record the remote head id before merge starts.
When commiting an unclean merge, just use the recorded id as
second parent id. Because the code ensures a new merge won't start
until the last unclean merge is commited, the recorded id is
garanteed to be the correct one.