Add protection to GenericStack to avoid writing to unallocated stacks:
- Add GS_StackNotAllocated_Error to cJSON_GenericStack_Result_t.
- Allways check if length is greater than 0 before committing any action.
- Return GS_StackNotAllocated_Error if stack is not allocated.