stk: Added --enable-debug flag

Added flag allows library to be compiled in a manner optimized for debugging.

Also some general housekeeping.