proxy: allow several instances with subpartitions having same reference
This reimplements commit 9d0926e9 with the following changes:
- support for multiple computers
- support for resilience takeover use case, which is implemented in such a way that 2 partitions can't have the same reference within the same instance tree
This is done by changing the semantics of the requested_by column in the partition
table. Before, it was the reference of the requesting partition (which would break the use of several computers), now it's the root instance title.
This requires an upgrade of the database, now version 17, and also some major changes in the code doing the migration. We rely on Python 3.6+ for the upgrade to be atomic and there must not be any old table (test_automatic_migration does not check that anymore).
Due to lack of use cases, changes for slaves and forwarded partitions are minimal and more work looks required on this topic. The proxy will refuse to migrate existing databases with non-empty slave table.