fix(clustering) fix race condition causing flakiness on sync status of data plane
fix(clustering) fix race condition causing flakiness on sync status of data plane

### Summary

There are two cases that may cause updating the sync status on database:

1. PING frame received by control plane from dataplane
2. New config send to dataplane from control plane

As these are ran in two threads and as the postgres upsert statement is
asyncronous non-blocking query, the order which we send the queries is
not always the order which they appear in postgres.

This PR makes our test suite less flaky on the race condition by grabbing
the initial configuration compatibility before starting the read/write threads.

There is also a small change that makes `last-seen` only updated when receiving
`PING` frame from data plane. This is more in line of what we had before.

Kong/kong,Kong/kong,Kong/kong