Bug 1598: Cleanup stale ShardReadTransactions

For read-only Tx, a FinalizablePhantomReference is created with the
TransacionProxy instance as the referent and is added to a static
FinalizableReferenceQueue. The FinalizablePhantomReference is subclassed
to hold the TransactionProxy's remoteTransactionPaths map. When the
TransactionProxy instance in GC'ed, the FinalizablePhantomReference is
notified and calls closeTransaction on each TransactionContext to clean it up.

Also to handle potentially stale Tx's due to disconnects, nodes prematurely
shutting down etc, I set set an idle time out (default 10 min) on ShardTransaction
actors via setReceiveTimeout. If the actor is idle with no messages
after the timeout, the actor self-destructs.

I made the idle timeout configurable via the config yang file. This
setting needs to be passed down from the module, thru the ShardManager
to the Shards to the ShardTransactions. I created a ShardCOntext class
to hold the idle timeout and other data that's passed down. This will
also make it easier in the future if additonal config data needs to be
passed down.

In the config yang file, I created a data-store-properties grouping to
avoid having to duplicate the config properties for the operational and
config data stores.

Many unit tests fail when running from Eclipse due to creating anonymous inner
Creator class instances in the static props methods. The akka code doesn't like this -
if the Creator instance class is enclosed in another class it expects
the class to be static. However this runs fine when running unit tests
from mvn and when running the production controller. I suspect the
difference is b/c the JDK compiler generates the anonymous class as
static since they're enclosed in static methods but the Eclipse compiler
doesn't. Anyway, to avoid this I refactored all the anonymous inner
Creator classes to private static classes. I think this is safer and
will avoid potential future issues with different JDK compilers or JDK upgrades.

Change-Id: Ie644612cb34e7219dc089b8add6d397a11bffdda
Signed-off-by: tpantelis <tpanteli@brocade.com>
Merge "Bug 1598: Cleanup stale ShardReadTransactions"