* libguile/struct.c (set_vtable_layout_flags): New function.
(scm_i_struct_inherit_vtable_magic): Use it.
(scm_struct_init): Optimize the case where HANDLE's vtable has the
`SCM_VTABLE_FLAG_SIMPLE' flag.
(scm_struct_ref): Likewise.
(scm_struct_ref): Likewise, when `SCM_VTABLE_FLAG_SIMPLE_RW' is also set.
* libguile/struct.h (SCM_VTABLE_BASE_LAYOUT): Update comment for the
next-to-last hidden field.
(scm_vtable_index_reserved_6): Rename to...
(scm_vtable_index_size): ... this.
(SCM_VTABLE_FLAG_RESERVED_0): Rename to...
(SCM_VTABLE_FLAG_SIMPLE): ... this.
(SCM_VTABLE_FLAG_RESERVED_1): Rename to...
(SCM_VTABLE_FLAG_SIMPLE_RW): ... this.
* test-suite/tests/structs.test ("low-level struct
procedures")["struct-ref", "struct-set!", "struct-ref out-of-range",
"struct-set! out-of-range"]: New tests.