libfoundation: The "unspecified" record base type is kMCNullTypeInfo not nil.

Fixes bug introduced (by me) in commit e50f93921882.
Merge pull request #1526 from peter-b/misc-records

libfoundation: The "unspecified" record base type is kMCNullTypeInfo not nil.
libfoundation: Always retain (and release) the __MCValue.typeinfo.
libfoundation: Always retain (and release) the __MCTypeInfo.named.
libfoundation: Include a record's typeinfo in its value hash.

It's possible for multiple record types to have fields named the same
with the same contents, but still be of differing underlying types.
libfoundation: MCRecordCreateMutable(): Store the record's typeinfo.
libfoundation: MCRecordTypeInfoIsDerivedFrom(): Initialise the loop variable.
libfoundation: MCRecordTypeInfoCreate(): Count fields before allocating array.
libfoundation: Remove extraneous semicolon.
libfoundation: MCTypeInfoBindAndRelease(): Correct handling of base typeinfo.
libfoundation: Use __MCTypeInfoGetTypeCode() instead of directly masking flags.
libfoundation: Unify record field-counting algorithms.

It doesn't make sense to have two implementations of the "count all
fields in record type and base types" algorithm, one in
foundation-record.cpp and one in foundation-typeinfo.cpp.

This patch adds a __MCRecordTypeInfoGetFieldCount() function, which
assumes that the typeinfo it is passed has already been resolved.

The implemented algorithm is iterative rather than recursive, for two reasons:

1) In the original __count_fields() implementation, the recursive call
   was not in a tail position; optimisation to a loop would have been
   non-trivial, and therefore an explicit loop is more efficient.

2) Infinite loops are easier to debug than stack overflows.
libfoundation: MCHandlerTypeInfoCreate(): Count args before allocating array.
Merge pull request #1529 from peter-b/misc-records

libfoundation: More records API fixes and improvements.
libfoundation: Synchronise with MLC branch.
Merge pull request #1536 from peter-b/develop

libfoundation: Synchronise MLC changes to 'develop' branch.
libfoundation: Define pointer type limit macros correctly on LLP64.
libfoundation: Ensure that SIZE_MAX and SIZE_MIN are defined.

These are defined by default on OS X but not on Linux (because
stdint.h is automatically included by the OS X compiler).
libfoundation: Use MCValueIsRecord() instead of __MCTypeInfoGetTypeCode().
    
The latter function was removed in the MLC branch.
libfoundation: MCHandlerTypeFieldInfo no longer has a 'name' member.

Look for the custodian in the 'type' member instead.