implement stack_t

fixed declaration of stack_pop.
added stack_shrink_to_fit, stack_peek.
added STACK_GROWTH_RATE macro in stack.h.