fixed config script for user-defined build dir
acquire larger stack for context-switching actors

the cs_thread implementation previously used the minimum stack
size possible, which lead to stack overflows in the context-switching
actors when compiled with debugging and logging
use smart pointer to store result of demangling
fixed memory handling of scheduled actors
fixed handling of wr events during MM shutdown