JSON: Import the basic JSON output framework

The JSON output format is used to make it easier for other program
to parse strace's results. We need to modify the existing code to
use this basic framework to support the JSON output.

* defs.h: Add the interface of the JSON output framework.
* json.c(newfile): The Implmentation of JSON output framework.
JSON: Add '-j' option to support JSON output

Modify strace to use the JSON framework.

* Makefile.am: Add json.c to compile list.
* strace.c(tprintf, tprints, usage, init): Add a new option '-j'
in init(), Modify tprintf/tprints to use the basic JSON framework,
Add 2 new function:_tprintf/_tprints for the original output.
* strace.1: Add document for '-j' option.
JSON: Add support for syscalls in io.c

Modify all the syscalls in io.c to support JSON output.
There are mainly two kind modification to strace:
1) simply modify sys_* functions to use the JSON framework;
2) modify those format/detail funcitons(such as printfd, printlval etc..)
to use the JSON framework;

* io.c (sys_read/write, sys_readv/writev, tprint_iov_upto,
sys_pread/pwrite, sys_preadv/pwritev, print_off_t, sys_ioctl
sys_sendfile/sendfile64, sys_tee, sys_splice, sys_vmsplice):
Modify to support JSON. The support for ioctl() is very limited
and need to be improved.

* util.c (printllval, printflags, printfd, printstr):
Modify all the io-related functions in util.c to support JSON.

* ioctl.c (ioctl_decode): very limited support for ioctl(), need to
be improved later.
JSON: Add support to entering/exiting of syscall

Each syscall in the output will be a object in a single line.
The object has at least 3 attributes:"type", "name", "args" and "ret".
the vaule of "args" is an array and the output now  only support string
as the basic value.

* syscall.c (trace_syscall_entering, trace_syscall_exiting):
Add support for entering/exiting of syscalls.

* process.c(sys_exit): Add support for special case of sys_exit().
JSON: Add basic test support for JSON framework

We will do 3 compare to check the output:
1) Compare the Unmodified strace output to the Normal outputs;
2) Compare the JSON parsed results to the Normal outputs(ignore space);
3) Compare the JSON parsed results to the Unmodified strace outputs(ignore space);

The 1st comparison should be identical to make sure we didn't break
the output content of strace.
The 2nd,3rd comparison may be different which remind us our implementation
need to be checked to see why we got this different.

Note: All the comparison may be different in some cases that the traced
results are random depending the runtime. You'd better install wdiff and
colordiff to make the output looks better.

* test/json_parse.py(newfile): I use python to parse the JSON output of
strace, you can also see this file for an example for parsing the JSON output.

* test/json_test.sh(newfile): The test main control, just run this script
under test to start all the test.
JSON: Add test case for syscalls in io.c

A special test file for syscalls in io.c, I tried to make the trace
results as stable as each time we execute the program.

* test/.gitignore: Add json_io.
* test/.Makefile: Add json_io.c to compile list.
* test/json_io.c(newfile): contain test cases for syscalls in io.c,
The only random number would be the pipe numver when calling syscalls
like spice,vmsplice.
JSON: Add support for '+++' signals

There are only 3 kind of '+++' signals in strace.
Note: Currently do NOT support the '<unfinished...>/<resumed>' in
JSON format. And this will make the those JSON lines invalid(or you can
just ignore these lines). Need to find a way to solve this problem.

* process.c(sys_exit): slightly reformat the code.
* syscall.c(trace_syscall_exiting): slightly reformat the code.
* strace.c(printleader, trace):
Add support for 'superseded', 'killed' and 'exited' signals.