Separate report submission into its own thread
The primary motivation of this commit is separated submit.c's submission
queue handling into a separate thread which sleeps on a condition variable
that is asserted in the inotify and timer event loops. Includes simpler
data structures/locking for the submission queue.
Associated refactoring includes:
- pull inotification out into its own file to keep corewatcher.c simpler
(subsequent event threads should be similarly separated)
- add many stderr fprintf's to allow better tracking of where the code is
during runtime when in non-daemon mode
- log both failed and successful server submission counts
- various bits of added error checking/handling
- better document internally the expectations on core file naming, how
the file name strings are transformed and stored in the internal
lists/arrays/hashtables, and an audit to insure oops->filename is
consistently populated and used
- fixed a few possible memory leaks
- updated some variable and function names to be more self documenting,
added inline documentation in places
- added design documentation covering the basic states, code that runs for
transitions between states, global state data structures and the
associated locks
Signed-off-by: Tim Pepper <timothy.c.pepper@linux.intel.com>