Generalize key type in SequenceGenerator

* The key type that is being used in `SequenceGenerator` does not necessarily have to be `String`.
* This commit changes it to being a parameterized type that the caller can specify.