Merge pull request #1503 from peter-b/misc-libfoundation

libfoundation: MCRecordCreateMutable(): Correct header prototype.
[[ FoundationRecord ]] Added MCRecordTypeInfoGetBaseType API.
libfoundation: MCRecordTypeInfoCreate(): Check p_base is actually a record type.
libfoundation: MCRecordTypeInfoGetBaseType(): Resolve & check passed type info.
libfoundation: MCRecordTypeInfoGetBaseType(): Correct header declaration.
libfoundation: Provide transparent access to fields of MCRecord base types.

A record which is built directly without extension should look the
same as one that is built by extension, from the point of view of API
consumers.
libfoundation: Add MCRecordTypeIsDerivedFrom().
libfoundation: Add record type conversion functions.

It's sometimes useful to be able to copy a record as a base type or as
a derived type.