Merge branch 'refactor-syntax_unicode' into refactor-syntax_unicode_kupdown

Merge with lastest upstream
Add Unicode support to key up/down events

The key up/down events kup(...) and kdown(...) now take StringRefs.

KeySym functionality has also been enhanced - it now allows the encoding of Unicode codepoints in addition to the traditional ASCII and special keys.

A greater emphasis has been placed on whether an object cares about key presses or simply text. The "field" object is obviously interested in text but buttons (in the guise of pushbuttons, menus, etc) are really concerned with a particular keystroke being used as an accelerator or mnemonic. Therefore, field objects make use of the p_string parameter of the kup/kdown message while buttons instead use KeySym.

Theoretically, this allows any Unicode codepoint to be used as an accelerator or mnemonic for menus and buttons, respectively.
Add CopyElementAs{Boolean,String,Number,{Unsigned,}Integer,Real,Array} to MCExecContext

These are equivalents to the similar functions in MCExecPoint
Merge branch 'refactor-syntax_unicode_button_menu' into refactor-syntax_unicode_kupdown

Conflicts:
	engine/src/osxdcmac.cpp
	engine/src/osxspec.cpp
	engine/src/stack2.cpp
Add basic implementation of MCStringGetCodepointAtIndex

Does not yet support UTF-16 with surrogate pairs!
Add MCKeySymToLower

Converts a KeySym value to its lower-case equivalent.
Merge branch 'refactor-syntax_unicode_button_menu' into refactor-syntax_unicode_kupdown
Merge branch 'refactor-syntax_unicode' into refactor-syntax_unicode_fetch
Add MCExecContext::CopyElementsAs{StringArray,Filepath,FilepathArray}

These methods copy an element as an array of strings, a path to a file or an array of paths to files, respectively.
Add CopyOptElementAs{String,Filepath}{,Array} to MCExecContext

These are identical to their non-optional bretheren except that they assign the destination to the empty string or array (as appropriate) if the named element is not present in the source array.
Add CopyOptElementAsBoolean method to MCExecContext

Copies a boolean element from an array or, if it doesn't exist, sets the desination to kMCFalse.
Add MCNAME: an equivalent of MCSTR for NameRefs

Does exactly what it says on the tin.
Update the deploy code to use StringRefs in most places.
Add missing MCExecContext::ConvertToArray implementation
Corrections to CopyElementAsStringArray and ConvertToArray

The former should split a string into an array, not assume an array of strings in the first place. The second lacked a required typecast.
Merge branch 'refactor-syntax_unicode_button_menu' into refactor-syntax_unicode_kupdown
The X_init/X_open process on OSX now supports Unicode

The UTF-8 argv/envp strings are now converted to StringRefs and processed in that form.

Windows and Linux have not been updated, however.
Add StringRef X_init support for Win32

Requires testing!
Add StringRef X_init support for Linux

Requires testing!
Update calls to setlocale()

Calls to the C library's setlocale function have been changed to more appropriate values. Previously, they were setting the LC_CTYPE and LC_COLLATE to the default system locales (as specified, e.g, through the $LANG or $LC_ALL environment variables) when what they really wanted to do was set them to the US English settings with the native encoding (Codepage 1252 for Windows, ISO-8859-1 for Linux and MacRoman for OSX). The other locale settings are set to the system default (this includes C library error messages, numerical formatting and time/dat formatting).