tm: lock replies before restoring flags for onreply_route
sercmd: read the rest from socket if message was too big for rcv buffer

- reported by Savolainen Dmitri, FS#422
json|jsonrpc-c: use new naming json-c lib if available
pkg/kamailio/deb: use libjson-c-dev when possible.