onionoo protocol/client api and base implementaion

derived from the discussion in #12869 (moved): this will be the support base for future onionoo java clients

  • separate the protocol from current onionoo implementation, so it can be reused in the client.
  • design onionoo client api and base implementation.