libfoundation: Fix Linux build.
libfoundation: Cast void* to intptr_t to avoid loss of precision error.

The Linux build settings cause an error if you try to cast a pointer
into an integer that's too small.
libfoundation: MCRecordTypeInfoCreate(): Allow nul-terminated field list.

This simplifies one-time creation of a MCRecordTypeInfo from a static
const array, e.g.:

    static const MCRecordTypeFieldInfo s_type_info_fields[] = {
      { MCNAME ("fieldName"), kMCStringTypeInfo },
      /* ... */
      { nil, kMCNullTypeInfo },
    };

    /* ... */

    MCTypeInfoRef t_type_info;
    MCRecordTypeInfoCreate (s_type_info_fields, -1, kMCNullTypeInfo,
    			    t_type_info);
libfoundation: MCHandlerTypeInfoCreate(): Allow nul-terminated field lists.
libfoundation: Define __MEDIUM__ on x86-64, rather than __HUGE__.

__MEDIUM__ is 64-bit pointers and 32-bit offsets; __HUGE__ is 64-bit
pointers with 64-bit offsets.
Merge pull request #1501 from peter-b/misc-libfoundation

Miscellaneous libfoundation fixes