implement PutDocument for updateEntity

The card says "extend ES package with a updateEntity for doc update functionality (not just adding new doc) " PUT does both add and update.

GetDocument comes along for the ride so that we can have proper tests.
This is a standard idiom that allows the method to know what type is
expected and unmarshal into a value of that type, verifying that
the document *can* be unmarshaled into that type and also
providing the caller with a known static type with all the information
easily available with no dynamic type conversions.