Check for `GetEnableMemories()` outside `PyDeviceList::PopulateMemoryKindInfo()`
Check for `GetEnableMemories()` outside `PyDeviceList::PopulateMemoryKindInfo()`

Checking `GetEnableMemories()` inside `PyDeviceList::PopulateMemoryKindInfo()` causes the memory kind to be built/cached based on the value of `enable_memories` at the time the method was called for the first time. This is problematic when users later change the value of `enable_memories` but reuse the same device list.

This CL fixes the problem by making `PyDeviceList::MemoryKinds()` and `PyDeviceList::DefaultMemoryKind()` always check for `GetEnableMemories()` outside the cached method to make it behave correctly even if `enable_memories` changes.
