Fix Sequence cache usage

The global cache was checked for the next value before the local session cache, which is problematic if a concurrent transaction commits and updates the global. Instead, always check the local first and never read from global if it was present.

The new MT failed pretty quickly without the fix. It differs from IdentityRestartWithMT in that a transaction can be open longer and with many INSERTs.