Some fixes to stack, large fixes for linkedlist

The stack wasnt decrementing `top` upon popping.
Added `demo.c` for stack

LinkedList has been revised with `free_fn` function
pointer that, if non-null, will be used when freeing
the linked list.