Move modify-keys to core; it's useful for more than postgres.