JSON RPC 2.0 + JSON over TCP + fixes

1) JSON RPC v2.0 compatibility
2) JSON RPC over TCP added (epee)
3) minor fixes, compiler warnings, readability improvements