libfoundation: Add MCAutoRecordRef.