aggregateChanges: Extract the os.Stat call into the statPathFunc argument
aggregateChanges: Extract the os.Stat call into the statPathFunc argument

By calling os.Stat aggregateChanges, which is otherwise a pure
function, interacts with its environment. Pulling it out into an
argument allows us to control the environment much easier by simply
mocking it in the unittests.

syncthing/syncthing-inotify,imsodin/syncthing-inotify,plouj/syncthing-inotify,syncthing/syncthing-inotify,imsodin/syncthing-inotify,plouj/syncthing-inotify,plouj/syncthing-inotify,syncthing/syncthing-inotify,imsodin/syncthing-inotify