Implemented a simple stacktrace writer

This will write a stacktrace of all current threads into crashes/%d.stack where
%d is the current timestamp.

Signed-off-by: Toon Schoenmakers <nighteyes1993@gmail.com>