Added utility function to ManagedObject for testing it's equality to other ManagedObject by contextId.