factor out the code which converts a nested struct mess into a well ordered list of field reflect.Values so it can be reused in NamedQuery, fixes #24