Added COPYING file.

Added distribution target.
Added JSONCodecTest and fixed a bug exposed by the tests.

Removed unnecessary utf8.