Fix stat name with underscore
 - Fix stat name with underscore

RB_ID=95514
Journal Force Write stats
Add stat for latency of force writes

RB_ID=95545
Add exception handlers for uncaught exceptions in bookie threads
1. Implement a new wrapper class BookieThread which sets the uncaught exception handler
2. If any of the main threads of the bookie (Bookie Thread, SyncThread, Journal Thread or Journal Force Write Thread) hit an uncaught exception, restart the bookie.

RB_ID=95390
Fix merge conflicts
Cap the wait time for entries so that grouping doesn't cause spikes in publish latencies
1. In each queue entry track the enqueue time. This can be used in the future to calculate latency and export stats (similar to what we do in hedwig for pending adds)
2. If the oldest pending entry has waited for longer than the threshold then we should issue a force write regardless of whether we have reached the buffered write threshold.
3. Add configuration parameters to experiment with these values in production
4. Some cleanup in BufferedChannel

RB_ID=95360
Convert the cache hits to a stats counter and remove the temporary logging

RB_ID=96381
Use AtomicInteger for FileInfo.useCount so as to avoid synchronization on FileInfo.use

RB_ID=95875
Remove bookkeeper shared semaphore test
Merge branch 'remove_reordered_writes' of https://git.twitter.biz/bookkeeper
Refactor LedgerCacheImpl to separate the in memory page management and persistence of index pages
1. Re-factor methods that read/write from the index files into a separate class IndexPersistenceMgr. This class has all methods that manage the files and also read/writes to them
2. Re-factor management of all index pages in memory to IndexInMemPageMgr. This class uses the IndexPersistenceMgr to flush changes to the index files
3. Wherever possible trying to localize assumptions about the format of the index files to IndexPersistenceMgr and LedgerPageEntry - but based on how the code is structured, haven't been able to clean all of them.

RB_ID=96826
Merge branch 'master' of https://git.twitter.biz/bookkeeper
Uses skip list to sort entries before adding them to entry log file, to improve ledger read performance. Memory arena is used to allocate skip list entries, to avoid GC impact.
A single-threaded scheduler is used to flush skip list to buffered entry log file channel, once configured data size limit is reached. Sync thread is notified as well to flush file buffers.
Compaction uses Skip list, to  merge entries together as well as remove duplicate entries.
This change also fix an existing issue of old entry logs being removed w/o forcing new entry logs flushed.

It is the first cut of BOOKKEEPER-432 implementation.
Later, we can use SSTable scheme to trim/avoid index file (each per ledger, potentially thousands per bookie) to reduce its impact to sync I/O.

RB_ID=95877
Fallback to ledger cache after skip list

RB_ID=97535
Integration from external bookkeeper repository
 - BOOKKEEPER-444: Refactor pending read op to make speculative reads possible (ivank)
 - BOOKKEEPER-430: Remove manual bookie registration from overview (fpj via ivank)
 - BOOKKEEPER-425: Cleanup Bookie id generation (ivank via fpj)
 - BOOKKEEPER-346: Detect IOExceptions in LedgerCache and bookie should look at next ledger dir(if any) (Vinay via ivank)
 - BOOKKEEPER-441: InMemorySubscriptionManager should back up top2sub2seq before change it (Yixue via ivank)
 - BOOKKEEPER-416: LedgerChecker returns underreplicated fragments for an closed ledger with no entries (ivank)
 - BOOKKEEPER-424: Bookie start is failing intermittently when zkclient connection delays (rakeshr via ivank) [missing files]
 - BOOKKEEPER-424: Bookie start is failing intermittently when zkclient connection delays (rakeshr via ivank)
 - BOOKKEEPER-345: Detect IOExceptions on entrylogger and bookie should consider next ledger dir(if any) (Vinay via ivank)
 - BOOKKEEPER-436: Journal#rollLog may leak file handler (umamahesh via ivank)
 - BOOKKEEPER-417: Hierarchical zk underreplication manager should clean up its hierarchy when done to allow for fast acquisition of underreplicated entries (ivank)
 - BOOKKEEPER-418: Store hostname of locker in replication lock (ivank)
 - BOOKKEEPER-315: Ledger entries should be replicated sequentially instead of parallel. (umamahesh via ivank)
 - BOOKKEEPER-319: Manage auditing and replication processes (Vinay via ivank)
 - BOOKKEEPER-278: Ability to disable auto recovery temporarily (rakeshr via ivank)
 - BOOKKEEPER-436: Journal#rollLog may leak file handler (umamahesh via ivank)
 - BOOKKEEPER-417: Hierarchical zk underreplication manager should clean up its hierarchy when done to allow for fast acquisition of underreplicated entries (ivank)
 - BOOKKEEPER-278: Ability to disable auto recovery temporarily (rakeshr via ivank)
 - BOOKKEEPER-418: Store hostname of locker in replication lock (ivank)
 - BOOKKEEPER-315: Ledger entries should be replicated sequentially instead of parallel. (umamahesh via ivank)
 - BOOKKEEPER-319: Manage auditing and replication processes (Vinay via ivank)

RB_ID=97533
 Refactor ledger storage to separate out InterleavedLedgerStorage and SkipListLedgerStorage
 - Refactor ledger storage to separate out InterleavedLedgerStorage and SkipListLedgerStorage

RB_ID=97763
Add sampled stat counter for journal grouping efficiency
We should occasionally sample the current grouping efficiency at the journal, this counter will be useful to correlate the effects of group commit with periods of high/variable latency or low throughput.

RB_ID=98168
Fix intermittent test failures
Several tests had intermittent failures as a result of HttpStatsExporter getting port/address conflicts. We don't need to enable to stats exporter in tests, in fact we have a configuration parameter to disable this, but its value was never checked. This change addresses that.

RB_ID=98287
Test Fix: Keep track of the bookie server so that it can be shutdown in the teardown method.
A newly created bookie server wasn't being tracked and hence not being shutdown predictably in the teardown method causing Address in Use errors on subsequent Bookie restart

RB_ID=98423
Track clean re-usable in memory index pages in a LRU Map
Add an auxiliary data structure to track LedgerEntryPages that are clean and not in use. This list is traversed to find available pages that can be reused when looking for a clean page. The auxiliary data structure is a LinkedHashMap so it naturally maintains the entries in access order providing LRU semantics.

There are no changes to the use of the nested concurrent maps - that data structure still continues to be the definitive map for looking up the LedgerEntryPages. There is no change to the logic that flushes the index.

I have removed the tracking of clean and dirty ledgers - I still retain some aspects of dirtyLedgers to cycle through the ledgers one by one as they are flushed to create clean pages.

RB_ID=97874
 Remove BufferedReorderedWriteChannel
 - Remove BufferedReorderedWriteChannel

RB_ID=98962