fixed some tests for windows, fixed directory move event for windows
tests: Fix failing unittest test_watchdog_observers_polling.TestPollingEmitter

There was both a FileDeletedEvent and a DirDeletedEvent for the entry, just
keep the latter. Also add missing to_file entry.

This makes the test work on OS X (tested on 10.8.3) and Linux (tested on Ubuntu 12.10)
Merge pull request #152 from Ormod/polling_test_fix

tests: Fix failing unittest test_watchdog_observers_polling.TestPollingE...
Merge pull request #107 from michaelmwu/win_dir_move1

fixed some tests for windows, fixed directory move event for windows
tests: Fix test to work on Windows

On Windows the absolute_path() call made the path look like
c:\\foobar instead of /foobar which made the repr() test fail.
tests: Fix polling test moves to work in Windows

Like explained in the observers.polling code, on Windows we do not get moves with the polling observer, change tests to take that into account.
Merge pull request #153 from Ormod/win_test_fixes

Win test fixes
dont fire move events for tree or watch sub-directories unless set to recursive. fixes #73
cosmetics
key (used for equality) in move event was never overriding. fixes #130
read_directory_changes: On directory create check if it may have been a move

On Windows if a folder is moved from outside the watched folder to inside it,
we only get a Directory Create from ReadDirectoryChangesW, no events for the directory's
children. Err on the side of caution and call them CreatedFile and DirEvents since we
can't be absolutely sure they came as the result of a move.
Merge pull request #154 from Ormod/read_dir

read_directory_changes: On directory create check if it's actually a mov...
inotify: dir/tree might be gone when we try to add a watch for it
Watchdog (on Windows) would create bad FS changed events streams

Code was stripping duplicate events from its internal queue. Example:
       Create X, Delete X, Create X, Edit X
Would be filtered to
       Create X, Delete X, Edit X
because the second "Create X" was still in the queue... thus it was
dropped. But that isn't a valid event stream. Can't 'Edit' a file that
doesn't exist.

Fixed by changing to use a queue that only dropped duplicate consecutive
events.
Fix DirectorySnapshot to handle 2 different cases
1) file X and Y exist.
       move X Y
   was not reporting proper results. Was only reporting
   that Y was deleted.
2) file dir1/X and dir2/X exist.
        move dir1/X dir2/X
   similar issue. Old code reported 'dir1/X' was deleted. And
   nothing about dir2/X

Proper event is that the file was 'Moved'

Original patch from Peter Potrebic <potrebic@gmail.com> that was further
improved by Hannu Valtonen <hannu.valtonen@ohmu.fi>
Merge pull request #165 from Ormod/ordered

Fixed and polished version of PR https://github.com/gorakhargosh/watchdog/pull/133
Cleanup some edge conditions in polling
- Don't hold lock while sleeping
- Avoid derefing a None _snapshot after on_thread_exit() is called
clean up the stop and on_thread_exit mess. see #169
inotify: dont remove watches before closing the fd.

there should be no need to manually remove watches when we are done as they will
be automatically freed when the fd is closed. this will hopefull fix the key
error exceptions too once and for all.
First pass at Python 3 compat