add FAIL_NOFUNCTION and allow duping failures

duping is to create a new failure based on the old, with updated data.
also delete some dead, unused functions from main.cpp.
added a document describing the core modules

not much in those modules yet. more to be added.