[Jay] Fix memory corruptions: out-of-bounds and uninitialized value.

Found two memory corruptions in Jay - an out-of-bounds access in end_rule(), and use of uninitialized values in the same function. The uninitialized memory should have been set to 0 when reallocating pitem in expand_items.
The bugs can be triggered by testing with low realloc sizes. First encountered this issue on windows, when using mingw, even with the large realloc sizes.

Here are the error logs from Valgrind and Clang's ASan:
https://gist.github.com/miguelzf/130aef65b65b12d3cf63
https://gist.github.com/miguelzf/c6d0d2dcd47c821eaf6d