Added CloseMode support to LeaderLatch

Added CloseMode support to LeaderLatch in order to be able to trigger the notLeader() callback when a Latch is manually closed.

The patch allows the close mode to be set either:
- During the creation of the latch so that the behavior is applied during a Closeable.close() call.
- Or on the close call to allow more specific control of notification behavior.

JIRA Issue to be added shortly.