A fix and a test case for gh-281.

(Crash on rename index).

Do not invalidate a reference to key_def in alter space,
when preserving the old index.

Instead, update the old key def with new parameters.