Trap unexpected data types
Add an encapper for Windows and Linux

The way it works is:
1. embedded the script into the executable file
2. the interpreter checks for the existence of the embedded script
3. if it finds it, runs it and ignores "--do" and script passed in from
the command line
4. if not, act as a regular interpreter

The encapper on linux is just a wrapper around objcopy, wihch adds a
section with the script to the executable

On Windows, the script is added as a resource, and some windows APIs are
used to retrieve the information.
Remove old comments
Be quiet when running an encapped script
Keep X11 includes out of core builds
Only use "backtrace" when available

backtrace is a GNU (glibc) extension which is not generally available in
other C libraries.
Merge pull request #10 from earl/run-encap-quiet

Be quiet when running an encapped script
Merge pull request #11 from earl/minor-build-improvements

Minor build improvements
Fix a crash when pasting from clipboard

Because clipboard operation on Linux is asynchronous, a READ event is
issued, which results in a "UPDATE" call on the port, so the req->data
can't be free'd when A_READ is returned. Move this to handler of
A_UPDATE. As a CLOSE event could follow READ, and it will also cause an
"UPDATE" call, so check for req->data being NULL to avoid confusion.
Add an option to embed script without compression

For those who blame decompression for bootup speed
Do not rely on argv[0] for executable file path

This is not reliable: it won't work if it's in $PATH and only the file
name is given.

Thanks to Andreas Bolka for pointing this out
[Linux] Turn off debugging output
Fix an unintended sign extension

Reported by coverity:
>>>     CID 68353:  Unintended sign extension  (SIGN_EXTENSION)
>>>     Suspicious implicit sign extension: "file_header.e_shnum"
with type "unsigned short" (16 bits, unsigned) is promoted in
"file_header.e_shnum * file_header.e_shentsize" to type "int" (32
bits, signed), then sign-extended to type "unsigned long" (64 bits,
unsigned).  If "file_header.e_shnum * file_header.e_shentsize" is
greater than 0x7FFFFFFF, the upper bits of the result will all be 1.
Remove the redundant "/payload" parsing
Compilation fixes for MSVC

It builds and runs with 32-bit, not quite tested yet
Check against NULL before assigning to a string

This fixes https://github.com/zsx/r3/issues/13

Decode_UTF_String returns NULL because the data doesn't have a BOM
Fix encoding detection for READ/string

Files with a BOM are now properly handled. Files without a BOM are again
decoded using UTF-8. Trying to READ/string a file with an encoding for
which support is not yet implemented (UCS4 LE and BE) now causes an
error.

This fixes zsx/r3#13, regressions introduced by 8336a45 and 70c7c3a, and
CureCode issue cc#2186.
Merge pull request #14 from earl/fix-read-string

Fix encoding detection for READ/string
Add a MS visual studio 2010 solution

Note:
 * Only 32-bit version is supported for now.
 * project file for libffi comes from https://github.com/pgregory/libffi-msvc
Do not call OS_Free directly

The core could be built as a library, in which case OS_Free might not
exist.