Fix inotify tree watcher bug

Change made by @kovidgoyal. Comment:

Fix a bug in the inotify tree watcher that incorrectly marked a tree as 
unchanged if an ignored event happens after a non-ignored event. This allows an 
optimisation in the git backed to be used (ignoring changes to .git/index.lock).

--

Not including actual commit as I do not think removing pygit2 backend is a good 
idea. Worse, removing pygit2 backend in the same commit fix is added is 
definitely bad idea.

Ref #874.