Add some tentative duplicate handling
The corewatcher needs to be ratelimited a bit for extremely crashy
applications. For example mate's marco will respawn as much as a hundred
times in a second. In the case of two cores within the same second the
existing code collides in the hash table, so simply note that and unlink
the core file which is under processing currently instead of erroring
back up the stack to the main loop. Do similarly for core files which
match within two characters at the end of the filename (ie: same time
mod 100 seconds).
This does have a bug though as the sent core is also being unlinked instead
of persisting, but it's a crude start anyway. Still needs refining and
also the space needs tmp watched.
Signed-off-by: Tim Pepper <timothy.c.pepper@linux.intel.com>