C++ codegen: arrays not correctly managed / destructed
See this generated code (by today's 0.8 /devel/ WebIDE), where we have an `m_entries` vector:

```cpp
void apfs_t::node_t::_read() {
  ...
  m_entries = new std::vector<kaitai::kstruct*>();
  m_entries->reserve(l_entries);
  for (int i = 0; i < l_entries; i++) {
    n_entries = true;
    switch (alignment_type()) {
      case ALIGNMENT_TYPE_FLEX_1: {
        n_entries = false;
        m_entries->push_back(new flex_entry_t(m__io, this, m__root));
        break;
      }
    ... more cases
    }
  }
}

apfs_t::node_t::~node_t() {
  delete m_meta_entry;
  if (!n_entries) {
    for (std::vector<kaitai::kstruct*>::iterator it = m_entries->begin(); it != m_entries->end(); ++it) {
      delete *it;
    }
    delete m_entries;
  }
}
```

The n_entries flag is set in the wrong place: It's reset in *every* for loop iteration, but it should only be set once before the loop, once its related vector is created. The fact that values get pushed into the vector is not relevant to iterating over the entries in the destructor. So, the flag should indicate that the vector has been created, not that values got added to the vector.

I only bring this up because I'm getting crashes in the destructor. I don't think the incorrect use of the flag is the reaon, but I'm still looking into that.