Raise ValueError from __init__ when the C constructor returns NULL,
instead of storing a NULL pointer that segfaults on parse()/reset().
Add defensive RuntimeError checks in parse() and reset() for closed
or failed parsers.
Add a test covering stackSize values that the C API rejects (-1, 0, 1, 2).
Fixes#23