Fix paginated order by with composite fields (#7187)
## Context
Cursor is modifying the where object but does not handle properly
composite fields. I'm introducing field metadata as a source of truth to
fix this issue.
RAW_JSON for example (as a sub-field type) should be ignored in a lt/gt,
probably other field types as well.
## Before
```typescript
[
{
emails: {
lt: {
primaryEmail: "brenda.brown@example.com",
additionalEmails: null,
},
},
},
{
emails: {
eq: {
primaryEmail: "brenda.brown@example.com",
additionalEmails: null,
},
},
position: {
gt: 877,
},
},
{
emails: {
eq: {
primaryEmail: "brenda.brown@example.com",
additionalEmails: null,
},
},
position: {
eq: 877,
},
id: {
gt: "fe43c45d-7560-4eb1-8fd3-c48fd0a4dcd4",
},
},
]
```
## After
```typescript
[
{
emails: {
primaryEmail: {
lt: "brenda.brown@example.com",
},
},
},
{
emails: {
primaryEmail: {
eq: "brenda.brown@example.com",
},
},
position: {
gt: 877,
},
},
{
emails: {
primaryEmail: {
eq: "brenda.brown@example.com",
},
},
position: {
eq: 877,
},
id: {
gt: "fe43c45d-7560-4eb1-8fd3-c48fd0a4dcd4",
},
},
]
```