Migrate ElanUtils to use NamedLocks
This use was missed by previous translation due to indirection
created by utility methods.
getElanMacDPNKey() is serving two purposes, really, which is as
a job key for JobCoordinator and also as the locking object.
This patch moves the first use to ElanPacketInHandler, which is
the sole user and removes the intern() call, as JobCoordinator
works on equality.
Second use case is locking of elans, which is migrated to NamedLocks,
as there do not seem to be any other callers who would be using
magic strings involved there. Rather than using strings, we expose
a lockElanMacDPN() method, which looks up and acquires the specific
lock, returning the handle back to caller. Callers are converted
to use normal try-with-resources to ensure the lock is released when
no longer needed.
JIRA: NETVIRT-1510
Change-Id: I0292e0e9a4e51ab98e62be5f01d59cb337ff1421
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>