Allocation improvements, fix memory leaks, use header file.

This commit adds proper array-style allocation functions that deliberately check
for integer overflow, fixes a number of memory leaks discovered with Valgrind,
and splits out many of the `#typedef` directives to `gammu-json.h`.
Remove debugging code; rename in preparation for UTF-16-BE patches.
Split `gammu-json.c` up in to multiple subsystem-specific files.
Update README.md with UTF-16-BE plans. Note: this is not yet implemented.
Work in progress; toward UTF-16 support (issue #2).
Fix `utf16be_string_info`. Now passes tests and resyncs properly.
Toward UTF-16 support in #2; work in progress.

The mechanics should be mostly here, but (i) the allocator wrapper needs some
refactoring so that it doesn't ever call `fatal` (since that will terminate the
entire process in REPL mode, rather than just print an error), and (ii) the
UTF-8 `string_info` function should probably check for invalid sequences rather
than just scan the high bits.
Minor fixes, no functionality change.
Fix off-by-one in REPL `send` mode; fix infinite loop in REPL error reporting.
Merge pull request #3 from browndav/master

Merge from upstream