RPC-LIB: check for response code before processing response

- We must check HTTP response code before processing response itself,
  since Apache can respond e.g. 503, and then HTML content is
  passed into JsonDeserializer and causes NullPointerException.

  If response code isn't HTTP_OK, then throw RpcException.
Merge pull request #397 from zlamalp/rpc-lib

RPC-LIB: check for response code before processing response