Fix string refcounting in context.c

adds missing fixes in context.c
The stack unrefs/has to unref the values when popping.