Refactored static GetKeyProperties method into ObjectContextKeys object.

To prevent possibility of duplicate key dictionary exceptions from being
thrown when executing in a asynchronous context.