MDEV-406: ANALYZE $stmt: Make multi-table UPDATE/DELETE work, code cleanup.