schema_registry: Ensure schema_ptr is always synced on the other core
schema_registry: Ensure schema_ptr is always synced on the other core

global_schema_ptr ensures that schema object is replicated to other
cores on access. It was replicating the "synced" state as well, but
only when the shard didn't know about the schema. It could happen that
the other shard has the entry, but it's not yet synced, in which case
we would fail to replicate the "synced" state. This will result in
exception from mutate(), which rejects attempts to mutate using an
unsynced schema.

The fix is to always replicate the "synced" state. If the entry is
syncing, we will preemptively mark it as synced earlier. The syncing
code is already prepared for this.

Refs #2617.
Message-Id: <6cc701cc6e7c8438b93c94f30df0ca38d795aa0d@scylladb.com>

duarten/scylla,duarten/scylla,duarten/scylla,scylladb/scylla,scylladb/scylla,scylladb/scylla,avikivity/scylla,scylladb/scylla,avikivity/scylla,avikivity/scylla