Test sharing and greatest lower bound for records.

There was a minor bug with processing shared fields in data types. There
is now a test to make sure that that code path is taken. Tests have also
been added to make sure that the greatest lower bound for records is
determined correctly.