State lost after ETL exception

### What is the current *bug* behavior?
The incremental state seems to have been completely lost, forcing a full re-sync of the DB.


### What is the expected *correct* behavior?
Meltano should always use the stored state.


### Steps to reproduce
I don't have a repro I'm afraid.



### Relevant logs and/or screenshots

```
# meltano --version
meltano, version 1.69.0
```

Running in a Docker container under GKE.

The last logs I got were:

```
meltano                | Loading failed (2): CRITICAL ['Traceback (most recent call last):
', '  File "/project/.meltano/loaders/target-bigquery/venv/lib/python3.8/site-packages/urllib3/connectionpool.py", line 445, in _make_request
    six.raise_from(e, None)
', '  File "<string>", line 3, in raise_from
', '  File "/project/.meltano/loaders/target-bigquery/venv/lib/python3.8/site-packages/urllib3/connectionpool.py", line 440, in _make_request
    httplib_response = conn.getresponse()
', '  File "/usr/local/lib/python3.8/http/client.py", line 1347, in getresponse
    response.begin()
', '  File "/usr/local/lib/python3.8/http/client.py", line 307, in begin
    version, status, reason = self._read_status()
', '  File "/usr/local/lib/python3.8/http/client.py", line 268, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
', '  File "/usr/local/lib/python3.8/socket.py", line 669, in readinto
    return self._sock.recv_into(b)
', '  File "/usr/local/lib/python3.8/ssl.py", line 1241, in recv_into
    return self.read(nbytes, buffer)
', '  File "/usr/local/lib/python3.8/ssl.py", line 1099, in read
    return self._sslobj.read(len, buffer)
', 'socket.timeout: The read operation timed out
', '
During handling of the above exception, another exception occurred:

', 'Traceback (most recent call last):
', '  File "/project/.meltano/loaders/target-bigquery/venv/lib/python3.8/site-packages/requests/adapters.py", line 439, in send
    resp = conn.urlopen(
', '  File "/project/.meltano/loaders/target-bigquery/venv/lib/python3.8/site-packages/urllib3/connectionpool.py", line 755, in urlopen
    retries = retries.increment(
', '  File "/project/.meltano/loaders/target-bigquery/venv/lib/python3.8/site-packages/urllib3/util/retry.py", line 532, in increment
    raise six.reraise(type(error), error, _stacktrace)
', '  File "/project/.meltano/loaders/target-bigquery/venv/lib/python3.8/site-packages/urllib3/packages/six.py", line 770, in reraise
    raise value
', '  File "/project/.meltano/loaders/target-bigquery/venv/lib/python3.8/site-packages/urllib3/connectionpool.py", line 699, in urlopen
    httplib_response = self._make_request(
', '  File "/project/.meltano/loaders/target-bigquery/venv/lib/python3.8/site-packages/urllib3/connectionpool.py", line 447, in _make_request
    self._raise_timeout(err=e, url=url, timeout_value=read_timeout)
', '  File "/project/.meltano/loaders/target-bigquery/venv/lib/python3.8/site-packages/urllib3/connectionpool.py", line 336, in _raise_timeout
    raise ReadTimeoutError(
', "urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='bigquery.googleapis.com', port=443): Read timed out. (read timeout=60)
", '
During handling of the above exception, another exception occurred:

', 'Traceback (most recent call last):
', '  File "/project/.meltano/loaders/target-bigquery/venv/lib/python3.8/site-packages/target_bigquery/__init__.py", line 92, in main
    for state in state_iterator:
', '  File "/project/.meltano/loaders/target-bigquery/venv/lib/python3.8/site-packages/target_bigquery/process.py", line 55, in process
    for s in handler.on_stream_end():
', '  File "/project/.meltano/loaders/target-bigquery/venv/lib/python3.8/site-packages/target_bigquery/processhandler.py", line 261, in on_stream_end
    self._do_temp_table_based_load(rows)
', '  File "/project/.meltano/loaders/target-bigquery/venv/lib/python3.8/site-packages/target_bigquery/processhandler.py", line 168, in _do_temp_table_based_load
    raise e
', '  File "/project/.meltano/loaders/target-bigquery/venv/lib/python3.8/site-packages/target_bigquery/processhandler.py", line 136, in _do_temp_table_based_load
    job = self._load_to_bq(
', '  File "/project/.meltano/loaders/target-bigquery/venv/lib/python3.8/site-packages/target_bigquery/processhandler.py", line 215, in _load_to_bq
    load_job = client.load_table_from_file(
', '  File "/project/.meltano/loaders/target-bigquery/venv/lib/python3.8/site-packages/google/cloud/bigquery/client.py", line 1760, in load_table_from_file
    response = self._do_resumable_upload(
', '  File "/project/.meltano/loaders/target-bigquery/venv/lib/python3.8/site-packages/google/cloud/bigquery/client.py", line 2085, in _do_resumable_upload
    upload, transport = self._initiate_resumable_upload(
', '  File "/project/.meltano/loaders/target-bigquery/venv/lib/python3.8/site-packages/google/cloud/bigquery/client.py", line 2127, in _initiate_resumable_upload
    upload.initiate(
', '  File "/project/.meltano/loaders/target-bigquery/venv/lib/python3.8/site-packages/google/resumable_media/requests/upload.py", line 345, in initiate
    response = _helpers.http_request(
', '  File "/project/.meltano/loaders/target-bigquery/venv/lib/python3.8/site-packages/google/resumable_media/requests/_helpers.py", line 136, in http_request
    return _helpers.wait_and_retry(func, RequestsMixin._get_status_code, retry_strategy)
', '  File "/project/.meltano/loaders/target-bigquery/venv/lib/python3.8/site-packages/google/resumable_media/_helpers.py", line 150, in wait_and_retry
    response = func()
', '  File "/project/.meltano/loaders/target-bigquery/venv/lib/python3.8/site-packages/google/auth/transport/requests.py", line 480, in request
    response = super(AuthorizedSession, self).request(
', '  File "/project/.meltano/loaders/target-bigquery/venv/lib/python3.8/site-packages/requests/sessions.py", line 542, in request
    resp = self.send(prep, **send_kwargs)
', '  File "/project/.meltano/loaders/target-bigquery/venv/lib/python3.8/site-packages/requests/sessions.py", line 655, in send
    r = adapter.send(request, **kwargs)
', '  File "/project/.meltano/loaders/target-bigquery/venv/lib/python3.8/site-packages/requests/adapters.py", line 529, in send
    raise ReadTimeout(e, request=request)
', "requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='bigquery.googleapis.com', port=443): Read timed out. (read timeout=60)
"]
meltano                | ELT could not be completed: Loader failed
ELT could not be completed: Loader failed
```

It seems the proximal cause is a timeout in BigQuery, but this appears to have caused Meltano to corrupt the state DB.

The first logs from the next ELT run are:

```
meltano                | Running extract & load...
meltano                | Found state from 2021-11-15 23:15:20.194728.
meltano                | No state was found, complete import.
tap-mysql--incremental | time=2021-11-15 23:45:21 name=tap_mysql level=INFO message=Server Parameters: version: 5.7.34-google, wait_timeout: 28000, innodb_lock_wait_timeout: 50, max_allowed_packet: 33554432, interactive_timeout: 28800
tap-mysql--incremental | time=2021-11-15 23:45:21 name=tap_mysql level=INFO message=Server SSL Parameters(blank means SSL is not active): [ssl_version: ], [ssl_cipher: ]
tap-mysql--incremental | time=2021-11-15 23:45:21 name=tap_mysql level=WARNING message=Columns {'id'} are primary keys but were not selected. Adding them.
tap-mysql--incremental | time=2021-11-15 23:45:22 name=tap_mysql level=INFO message=Beginning sync for InnoDB table qwil.admin_comments_comment
tap-mysql--incremental | time=2021-11-15 23:45:22 name=tap_mysql level=INFO message=Stream qwil-admin_comments_comment is using full table replication
tap-mysql--incremental | time=2021-11-15 23:45:22 name=tap_mysql level=INFO message=Detected auto-incrementing primary key(s) - will replicate incrementally
tap-mysql--incremental | time=2021-11-15 23:45:22 name=tap_mysql level=INFO message=Running SELECT `content_type_id`,`object_id`,`time`,`comment`,`id`,`user_id` FROM `qwil`.`admin_comments_comment` WHERE `id` <= 2789 ORDER BY `id` ASC
tap-mysql--incremental | /project/.meltano/extractors/tap-mysql--incremental/venv/lib/python3.8/site-packages/pymysql/connections.py:1077: UserWarning: Previous unbuffered result was left incomplete
tap-mysql--incremental |   warnings.warn("Previous unbuffered result was left incomplete")
```

The "previous unbuffered result was left incomplete" log sounds pretty suspicious, though it is coming from the `tap-mysql` and not meltano so perhaps it's a red herring. However you can clearly see that Meltano is a bit confused with the "found state" => "no state found" logs.

### Possible fixes
Is it possible that Meltano isn't flushing its writes to the state DB, such that on a hard crash it is corrupting the DB?


### Further regression test

Story points: 4.0