C++: memory leaks on some exceptions
Current code generated by CppCompiler is not really exception-safe. It's structured in a way that implies that `_read()` called from constructor always completes in full, and that's not always true if an exception occurs in the middle of the process.

For example, in `if_struct.ksy`:

```cpp
if_struct_t::if_struct_t(kaitai::kstream *p_io, kaitai::kstruct* p_parent, if_struct_t *p_root) : kaitai::kstruct(p_io) {
    m__parent = p_parent;
    m__root = this;
    _read();
}

void if_struct_t::_read() {
    m_op1 = new operation_t(m__io, this, m__root);
    m_op2 = new operation_t(m__io, this, m__root);
    m_op3 = new operation_t(m__io, this, m__root);
}

if_struct_t::~if_struct_t() {
    delete m_op1;
    delete m_op2;
    delete m_op3;
}
```

If one of `new operation_t` would throw an exception (for example, because of not enough bytes to read and/or other reasons, such as IO error, or basically any other possible C++ exception), this would result in constructor failing → destructor called to everything clean up → some of `m_opX` members would be contain garbage → `delete` would be called on them → it would most likely result in a segfault.

The correct way to structure this code would be probably:

1. Clean up all "dangerous" (i.e. pointer) members before any exceptions might occur
2. Wrap all pointer deletions into safeguard if: `if (m_op1)  delete m_op1;`