Switch auto-ids to Flake IDs from random UUIDs

This PR starts from @GaelTadh's original PR (#6004) and just folds in the last round of feedback ... I think it's ready?
Maybe the bug is that

```java
timestamp++;
```

should be replaced with

```java
timestamp = Math.max(timestamp, last) + 1;
```

to ensure that the timestamp actually increases when `sequenceId` wraps?