Reuse OrderedByEffectiveStatement instances
This is a low-cardinality statement for which we are already reusing
declared instances. This extends that support to cover effective
instances based on the shared declared instances.
Also ditch the use of EnumMap -- while it works, we only have two
values, which is easily taken care of by a switch statement.
JIRA: YANGTOOLS-1065
Change-Id: I43f135c9dec443b1b46b5517fa98f2c08af3d877
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
b235e6290637ae2decf53015012807026bb849db)