Support for passing a struct to a document instead of map[string]interface{}

I (kind of) see what you are trying to say in the other point, but for this one I'd rather leave it as is, so we don't change the current semantics of this function (i.e., no check for empty doc).