This checks, up to the end of the frame, that we have a valid \0 for the
CString before passing it back to the caller. Otherwise, NULL is returned
for a corrupt/invalid CString within the frame.
We want to have an object hierarchy, but we don't want to expose our class
or other internal details to the public API/ABI. This uses the old form of
class definition so we can maintain that.
An alternative would be to do what GDK does for internal types, should we
find that easier to maintain going forward.
Also handle swapping the data when non-native endian so that we can leave
our GMappedFile unperturbed (and therefore not have to keep those bytes as
dirty pages in process).