improve DetailsDocument

When the protocol api is finished apply changes to DetailsDocument and RequestHandler (see patch from parent ticket).

Questions to address:

  • Does Gson still (de-)serialize details documents correctly with this new code?
  • Is there an easy way to preserve static type safety with the new approach?