Add new test to check for early destruction of records

Records inside a global tuple are autoDestroyed too early when the
record contains a member with a type such as an array. This causes the
use of an invalid pointer, and can lead to segfaults, double frees and
similar errors.