- introduce loader_reset() that frees all memory
- resolve memory leak in loader_format_shlibpath()
- correctly handle library reload: check if a function has been
retrieved already. Don't leak memory (strdup()), and handle multiple
reloads of different functions from the same SO
* check whether a library has been loaded before; in this case, don't allocate
new memory but load from old library again
* vital parameters, previous exit_fun are checked by AssertFatal()
* structure has changed a bit to make it easier to follow (instead of nested
ifs includes one goto to the end of the function)
* formatting has been improved