BUG-650: optimize DOMDataBrokerImpl chain creation

An EnumMap is better than an immutable map when accessing via the
enumeration value. Also add a check for closed factory.

Change-Id: I208005a2b13c0a16cb594da7c74556f4e9a54e50
Signed-off-by: Robert Varga <rovarga@cisco.com>