Made OptionFactory registration take a string key.

This decouples the actual implementation from usage.